#include <libunwind.h>
-#include "mc_object_info.h"
-#include "mc_process.h"
-#include "mc_unw.h"
-#include "mc/Frame.hpp"
+#include "src/mc/Process.hpp"
+#include "src/mc/mc_unw.h"
+#include "src/mc/Frame.hpp"
using simgrid::mc::remote;
case UNW_X86_64_R14: return &mcontext->gregs[REG_R14];
case UNW_X86_64_R15: return &mcontext->gregs[REG_R15];
case UNW_X86_64_RIP: return &mcontext->gregs[REG_RIP];
- default: return NULL;
+ default: return nullptr;
}
#else
- return NULL;
+ return nullptr;
#endif
}
simgrid::mc::Frame* frame = context->process->find_function(remote(addr));
if (!frame)
return - UNW_ENOINFO;
- *offp = (unw_word_t) frame->low_pc - addr;
+ *offp = (unw_word_t) frame->range.begin() - addr;
strncpy(bufp, frame->name.c_str(), buf_len);
if (bufp[buf_len - 1]) {
{
if (!context->process || !context->address_space)
return -UNW_EUNSPEC;
- simgrid::mc::AddressSpace* as = context->address_space;
-
- simgrid::mc::Process* process = dynamic_cast<simgrid::mc::Process*>(as);
- if (process && process->is_self())
- return unw_init_local(cursor, &context->context);
-
return unw_init_remote(cursor, context->process->unw_addr_space, context);
}