diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:56 +0000 | 
| commit | 7fed546d1996271dabc7cf71d4d033125c4da4ee (patch) | |
| tree | 2b6dc7dcb4a6380cb331aded15f5a81c0038e194 /source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp | |
| parent | 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp')
| -rw-r--r-- | source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp | 16 | 
1 files changed, 15 insertions, 1 deletions
diff --git a/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp index e4d26fc640f3..22cdbb40d15c 100644 --- a/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ b/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -9,6 +9,7 @@  #if defined (__arm64__) || defined (__aarch64__) +#include "NativeRegisterContextLinux_arm.h"  #include "NativeRegisterContextLinux_arm64.h"  // C Includes @@ -23,6 +24,7 @@  #include "Plugins/Process/Linux/NativeProcessLinux.h"  #include "Plugins/Process/Linux/Procfs.h" +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"  #include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"  // System includes - They have to be included after framework includes because they define some @@ -142,7 +144,19 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(const ArchSpec&                                                                   NativeThreadProtocol &native_thread,                                                                   uint32_t concrete_frame_idx)  { -    return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +    Log *log  = ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS); +    switch (target_arch.GetMachine()) +    { +        case llvm::Triple::arm: +            return new NativeRegisterContextLinux_arm(target_arch, native_thread, concrete_frame_idx); +        case llvm::Triple::aarch64: +            return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +        default: +            if (log) +                log->Printf("NativeRegisterContextLinux::%s() have no register context for architecture: %s\n", __FUNCTION__, +                            target_arch.GetTriple().getArchName().str().c_str()); +            return nullptr; +    }  }  NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64 (const ArchSpec& target_arch,  | 
