[Lldb-commits] [lldb] r245536 - When the target definition is unparseable, print an error message

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 19 20:05:09 PDT 2015


Author: jmolenda
Date: Wed Aug 19 22:05:09 2015
New Revision: 245536

URL: http://llvm.org/viewvc/llvm-project?rev=245536&view=rev
Log:
When the target definition is unparseable, print an error message
to the user.  e.g. specified via the
plugin.process.gdb-remote.target-definition-file 
setting.  Currently we silently ignore the target definition if
there is a parse error.


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=245536&r1=245535&r2=245536&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Aug 19 22:05:09 2015
@@ -529,7 +529,14 @@ ProcessGDBRemote::BuildDynamicRegisterIn
     {
         // See if we can get register definitions from a python file
         if (ParsePythonTargetDefinition (target_definition_fspec))
+        {
             return;
+        }
+        else
+        {
+            StreamSP stream_sp = GetTarget().GetDebugger().GetAsyncOutputStream();
+            stream_sp->Printf ("ERROR: target description file %s failed to parse.\n", target_definition_fspec.GetPath().c_str());
+        }
     }
 
     if (GetGDBServerRegisterInfo ())




More information about the lldb-commits mailing list