diff options
author | Greg Clayton <gclayton@apple.com> | 2010-12-01 22:45:40 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-12-01 22:45:40 +0000 |
commit | 3c14438fe87660578c39533e388f7938fb2b8625 (patch) | |
tree | ca5f7688456d0590539f094e933af4e2e3ae8acb /lldb/tools/debugserver/source/DNBArch.cpp | |
parent | 7cfe7679aa9741900a56cd84ef4453067d3a0560 (diff) | |
download | bcm5719-llvm-3c14438fe87660578c39533e388f7938fb2b8625.tar.gz bcm5719-llvm-3c14438fe87660578c39533e388f7938fb2b8625.zip |
Fixed 32 bit debugging after recent architecture changes to debugserver.
llvm-svn: 120618
Diffstat (limited to 'lldb/tools/debugserver/source/DNBArch.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/DNBArch.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lldb/tools/debugserver/source/DNBArch.cpp b/lldb/tools/debugserver/source/DNBArch.cpp index 0a6495018a4..11743916b13 100644 --- a/lldb/tools/debugserver/source/DNBArch.cpp +++ b/lldb/tools/debugserver/source/DNBArch.cpp @@ -22,13 +22,13 @@ typedef std::map<uint32_t, DNBArchPluginInfo> CPUPluginInfoMap; #if defined (__i386__) -uint32_t g_current_cpu_type = CPU_TYPE_I386; +static uint32_t g_current_cpu_type = CPU_TYPE_I386; #elif defined (__x86_64__) -uint32_t g_current_cpu_type = CPU_TYPE_X86_64; +static uint32_t g_current_cpu_type = CPU_TYPE_X86_64; #elif defined (__arm__) -uint32_t g_current_cpu_type = CPU_TYPE_ARM; +static uint32_t g_current_cpu_type = CPU_TYPE_ARM; #else -uint32_t g_current_cpu_type = 0; +static uint32_t g_current_cpu_type = 0; #endif CPUPluginInfoMap g_arch_plugins; @@ -43,12 +43,20 @@ GetArchInfo () return NULL; } -void -DNBArchProtocol::SetDefaultArchitecture (uint32_t cpu_type) + +uint32_t +DNBArchProtocol::GetArchitecture () +{ + return g_current_cpu_type; +} + +bool +DNBArchProtocol::SetArchitecture (uint32_t cpu_type) { - DNBLogThreadedIf (LOG_PROCESS, "DNBArchProtocol::SetDefaultArchitecture (cpu_type=0x%8.8x)", cpu_type); g_current_cpu_type = cpu_type; - assert (g_arch_plugins.find(g_current_cpu_type) != g_arch_plugins.end()); + bool result = g_arch_plugins.find(g_current_cpu_type) != g_arch_plugins.end(); + DNBLogThreadedIf (LOG_PROCESS, "DNBArchProtocol::SetDefaultArchitecture (cpu_type=0x%8.8x) => %i", cpu_type, result); + return result; } void |