[Lldb-commits] [lldb] r241063 - Change search order of target definition files.

Ewan Crawford ewan at codeplay.com
Tue Jun 30 06:08:45 PDT 2015


Author: ewancrawford
Date: Tue Jun 30 08:08:44 2015
New Revision: 241063

URL: http://llvm.org/viewvc/llvm-project?rev=241063&view=rev
Log:
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


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=241063&r1=241062&r2=241063&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Jun 30 08:08:44 2015
@@ -520,6 +520,19 @@ ProcessGDBRemote::BuildDynamicRegisterIn
         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::BuildDynamicRegisterIn
         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.





More information about the lldb-commits mailing list