]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/inspect/mc_unw.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cosmetics while trying to understand that code
[simgrid.git] / src / mc / inspect / mc_unw.cpp
index 8f37ddb5e124cf71fe879158e9e864c85cb09538..5806cacb08942079771ab571b2a0ce3149ab4dec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -12,7 +12,7 @@
 
 #include "src/mc/inspect/mc_unw.hpp"
 #include "src/mc/inspect/Frame.hpp"
-#include "src/mc/remote/RemoteSimulation.hpp"
+#include "src/mc/remote/RemoteProcess.hpp"
 
 #include <cstring>
 
@@ -25,10 +25,7 @@ typedef register_t greg_t;
 
 #include <libunwind.h>
 
-using simgrid::mc::remote;
-
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 // ***** Implementation
 
@@ -221,14 +218,14 @@ unw_addr_space_t UnwindContext::createUnwindAddressSpace()
   return unw_create_addr_space(&accessors, BYTE_ORDER);
 }
 
-void UnwindContext::initialize(simgrid::mc::RemoteSimulation* process, unw_context_t* c)
+void UnwindContext::initialize(simgrid::mc::RemoteProcess* process, unw_context_t* c)
 {
   this->address_space_ = process;
   this->process_      = process;
 
   // Take a copy of the context for our own purpose:
   this->unwind_context_ = *c;
-#if SIMGRID_PROCESSOR_x86_64 || SIMGRID_PROCESSOR_i686
+#if SIMGRID_PROCESSOR_x86_64 || SIMGRID_PROCESSOR_i686 || defined(__aarch64__)
 #ifdef __linux__
   // On x86_64, ucontext_t contains a pointer to itself for FP registers.
   // We don't really need support for FR registers as they are caller saved
@@ -252,5 +249,4 @@ unw_cursor_t UnwindContext::cursor()
   return cursor;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc