[lldb] Migrate ProcessGDBRemote to ReportWarning
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 17 Mar 2022 20:55:24 +0000 (13:55 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 17 Mar 2022 22:13:48 +0000 (15:13 -0700)
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

index d8dc229..2e652e1 100644 (file)
@@ -410,13 +410,13 @@ void ProcessGDBRemote::BuildDynamicRegisterInfo(bool force) {
   }
   if (target_definition_fspec) {
     // See if we can get register definitions from a python file
-    if (ParsePythonTargetDefinition(target_definition_fspec)) {
+    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());
-    }
+
+    Debugger::ReportError("target description file " +
+                              target_definition_fspec.GetPath() +
+                              " failed to parse",
+                          GetTarget().GetDebugger().GetID());
   }
 
   const ArchSpec &target_arch = GetTarget().GetArchitecture();