summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorEwan Crawford <ewan@codeplay.com>2015-06-30 13:08:44 +0000
committerEwan Crawford <ewan@codeplay.com>2015-06-30 13:08:44 +0000
commit0c996a9a067f62cf61b9a8a9e94326be88d8d641 (patch)
treee72a96f966b54aa7f36af6608c0f61fd906933c7 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parentfc97d8a95a9624bbb4378f3f6fc12f37f183ddac (diff)
downloadbcm5719-llvm-0c996a9a067f62cf61b9a8a9e94326be88d8d641.tar.gz
bcm5719-llvm-0c996a9a067f62cf61b9a8a9e94326be88d8d641.zip
Change search order of target definition files.
Make the python target definition file have highest priority so that we can set the remote stub breakpoint pc offset using it. Reviewers: clayborg Subscribers: ted, deepak2427, lldb-commits Differential revision: http://reviews.llvm.org/D10775 llvm-svn: 241063
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index d712a2596e3..5cb4da514a7 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -520,6 +520,19 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)
GetGlobalPluginProperties()->SetPacketTimeout(host_packet_timeout);
}
+ // Register info search order:
+ // 1 - Use the target definition python file if one is specified.
+ // 2 - If the target definition doesn't have any of the info from the target.xml (registers) then proceed to read the target.xml.
+ // 3 - Fall back on the qRegisterInfo packets.
+
+ FileSpec target_definition_fspec = GetGlobalPluginProperties()->GetTargetDefinitionFile ();
+ if (target_definition_fspec)
+ {
+ // See if we can get register definitions from a python file
+ if (ParsePythonTargetDefinition (target_definition_fspec))
+ return;
+ }
+
if (GetGDBServerRegisterInfo ())
return;
@@ -679,15 +692,6 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)
return;
}
- FileSpec target_definition_fspec = GetGlobalPluginProperties()->GetTargetDefinitionFile ();
-
- if (target_definition_fspec)
- {
- // See if we can get register definitions from a python file
- if (ParsePythonTargetDefinition (target_definition_fspec))
- return;
- }
-
// We didn't get anything if the accumulated reg_num is zero. See if we are
// debugging ARM and fill with a hard coded register set until we can get an
// updated debugserver down on the devices.
OpenPOWER on IntegriCloud