summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Kok <ck@remobjects.com>2013-10-14 07:09:13 +0000
committerCarlo Kok <ck@remobjects.com>2013-10-14 07:09:13 +0000
commit7438912fb84bd7efe503f8803e8e596a10c22112 (patch)
tree1458eb0975af181b2ef6523461b7615c434a35e6
parentd9ba47271da8d28972dd766cd8504bdac06a49cd (diff)
downloadbcm5719-llvm-7438912fb84bd7efe503f8803e8e596a10c22112.tar.gz
bcm5719-llvm-7438912fb84bd7efe503f8803e8e596a10c22112.zip
Set the architecture from the remote executable when it's not set so the register info can be loaded properly (and thus the callstacks work)
llvm-svn: 192571
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 31b430c3e82..ad06724add8 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -564,6 +564,11 @@ ProcessGDBRemote::DoConnectRemote (Stream *strm, const char *remote_url)
GetThreadList();
if (m_gdb_comm.SendPacketAndWaitForResponse("?", 1, m_last_stop_packet, false))
{
+ if (!m_target.GetArchitecture().IsValid()) { // Make sure we have an architecture
+ m_target.SetArchitecture(m_gdb_comm.GetProcessArchitecture());
+ }
+
+
const StateType state = SetThreadStopInfo (m_last_stop_packet);
if (state == eStateStopped)
{
@@ -762,6 +767,10 @@ ProcessGDBRemote::DoLaunch (Module *exe_module, const ProcessLaunchInfo &launch_
if (m_gdb_comm.SendPacketAndWaitForResponse("?", 1, m_last_stop_packet, false))
{
+ if (!m_target.GetArchitecture().IsValid()) { // Make sure we have an architecture
+ m_target.SetArchitecture(m_gdb_comm.GetProcessArchitecture());
+ }
+
SetPrivateState (SetThreadStopInfo (m_last_stop_packet));
if (!disable_stdio)
OpenPOWER on IntegriCloud