Skip to content

Commit

Permalink
Change search order of target definition files.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
EwanC committed Jun 30, 2015
1 parent fc97d8a commit 0c996a9
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0c996a9

Please sign in to comment.