[Lldb-commits] [lldb] acba66f - [lldb/crashlog] Standardize file path key in the ScriptedProcess Dictionary

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 4 22:06:33 PDT 2022


Author: Med Ismail Bennani
Date: 2022-11-04T22:05:58-07:00
New Revision: acba66fdde0ea918d4b7bd16863ac1bba7d1521b

URL: https://github.com/llvm/llvm-project/commit/acba66fdde0ea918d4b7bd16863ac1bba7d1521b
DIFF: https://github.com/llvm/llvm-project/commit/acba66fdde0ea918d4b7bd16863ac1bba7d1521b.diff

LOG: [lldb/crashlog] Standardize file path key in the ScriptedProcess Dictionary

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 at gmail.com>

Added: 
    

Modified: 
    lldb/examples/python/crashlog.py
    lldb/examples/python/scripted_process/crashlog_scripted_process.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index c3a450ccb14bd..b62ebd758f22c 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -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")

diff  --git a/lldb/examples/python/scripted_process/crashlog_scripted_process.py b/lldb/examples/python/scripted_process/crashlog_scripted_process.py
index 55c50917c9d67..7ed5cc930da72 100644
--- a/lldb/examples/python/scripted_process/crashlog_scripted_process.py
+++ b/lldb/examples/python/scripted_process/crashlog_scripted_process.py
@@ -71,7 +71,7 @@ def __init__(self, target: lldb.SBTarget, args : lldb.SBStructuredData):
 
         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)


        


More information about the lldb-commits mailing list