[lldb/crashlog] Standardize file path key in the ScriptedProcess Dictionary
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Sat, 5 Nov 2022 04:58:51 +0000 (21:58 -0700)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Sat, 5 Nov 2022 05:05:58 +0000 (22:05 -0700)
This patch replaces the backing file path key to "file_path" to keep it
consistent.

rdar://101652618

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/examples/python/crashlog.py
lldb/examples/python/scripted_process/crashlog_scripted_process.py

index c3a450c..b62ebd7 100755 (executable)
@@ -1104,7 +1104,7 @@ def load_crashlog_in_scripted_process(debugger, crash_log_file, options, result)
         raise InteractiveCrashLogException("couldn't import crashlog scripted process module")
 
     structured_data = lldb.SBStructuredData()
-    structured_data.SetFromJSON(json.dumps({ "crashlog_path" : crashlog_path,
+    structured_data.SetFromJSON(json.dumps({ "file_path" : crashlog_path,
                                              "load_all_images": options.load_all_images }))
     launch_info = lldb.SBLaunchInfo(None)
     launch_info.SetProcessPluginName("ScriptedProcess")
index 55c5091..7ed5cc9 100644 (file)
@@ -71,7 +71,7 @@ class CrashLogScriptedProcess(ScriptedProcess):
 
         self.crashlog_path = None
 
-        crashlog_path = args.GetValueForKey("crashlog_path")
+        crashlog_path = args.GetValueForKey("file_path")
         if crashlog_path and crashlog_path.IsValid():
             if crashlog_path.GetType() == lldb.eStructuredDataTypeString:
                 self.crashlog_path = crashlog_path.GetStringValue(4096)