#include <libunwind.h>
-#include "mc_object_info.h"
-#include "mc_process.h"
-#include "mc_unw.h"
+#include "src/mc/mc_object_info.h"
+#include "src/mc/Process.hpp"
+#include "src/mc/mc_unw.h"
+#include "src/mc/Frame.hpp"
using simgrid::mc::remote;
/** Read from the target address space memory (libunwind method)
*
- * Delegates to the `mc_process_t`.
+ * Delegates to the `simgrid::mc::Process*`.
*/
static int access_mem(unw_addr_space_t as,
unw_word_t addr, unw_word_t *valp,
void* arg)
{
mc_unw_context_t context = (mc_unw_context_t) arg;
- mc_frame_t frame = context->process->find_function(remote(addr));
+ simgrid::mc::Frame* frame = context->process->find_function(remote(addr));
if (!frame)
return - UNW_ENOINFO;
*offp = (unw_word_t) frame->low_pc - addr;
// ***** Context management
int mc_unw_init_context(
- mc_unw_context_t context, mc_process_t process, unw_context_t* c)
+ mc_unw_context_t context, simgrid::mc::Process* process, unw_context_t* c)
{
context->address_space = process;
context->process = process;
{
if (!context->process || !context->address_space)
return -UNW_EUNSPEC;
- mc_address_space_t as = context->address_space;
-
- mc_process_t process = dynamic_cast<mc_process_t>(as);
- if (process && process->is_self())
- return unw_init_local(cursor, &context->context);
-
return unw_init_remote(cursor, context->process->unw_addr_space, context);
}