[Lldb-commits] [lldb] r192571 - 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)
Carlo Kok
ck at remobjects.com
Mon Oct 14 00:09:13 PDT 2013
Author: carlokok
Date: Mon Oct 14 02:09:13 2013
New Revision: 192571
URL: http://llvm.org/viewvc/llvm-project?rev=192571&view=rev
Log:
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)
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=192571&r1=192570&r2=192571&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Oct 14 02:09:13 2013
@@ -564,6 +564,11 @@ ProcessGDBRemote::DoConnectRemote (Strea
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_
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)
More information about the lldb-commits
mailing list