This revision was automatically updated to reflect the committed changes. Closed by commit rGbadb6e2730a9: [lldb/crashlog] Fix scripted_crashlog_json.test failure (authored by mib).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120598/new/ https://reviews.llvm.org/D120598 Files: lldb/examples/python/crashlog.py lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips Index: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips =================================================================== --- lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips +++ lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips @@ -21,8 +21,8 @@ "procExitAbsTime" : 6478056175721, "translated" : false, "cpuType" : "ARM-64", - "procName" : "scripted_crashlog_json.test.tmp.out", - "procPath" : "\/Users\/USER\/*\/scripted_crashlog_json.test.tmp.out", + "procName" : "@NAME@", + "procPath" : "@EXEC@", "parentProc" : "zsh", "parentPid" : 82132, "coalitionName" : "com.apple.Terminal", @@ -47,8 +47,9 @@ "base" : 4372692992, "size" : 16384, "uuid" : "b928ee77-9429-334f-ac88-41440bb3d4c7", - "path" : "\/Users\/USER\/*\/scripted_crashlog_json.test.tmp.out", - "name" : "scripted_crashlog_json.test.tmp.out" + "uuid" : "@UUID@", + "path" : "@EXEC@", + "name" : "@NAME@" }, { "source" : "P", Index: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips =================================================================== --- lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips +++ lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips @@ -21,8 +21,8 @@ "incident" : "FA21DF23-3344-4E45-BF27-4B8E63B7012B", "pid" : 72932, "cpuType" : "X86-64", - "procName" : "json.test.tmp.out", - "procPath" : "\/Users\/USER\/*\/json.test.tmp.out", + "procName" : "@NAME@", + "procPath" : "@EXEC@", "parentProc" : "fish", "parentPid" : 67002, "coalitionName" : "io.alacritty", Index: lldb/examples/python/crashlog.py =================================================================== --- lldb/examples/python/crashlog.py +++ lldb/examples/python/crashlog.py @@ -989,7 +989,10 @@ result.PutCString("error: python exception: %s" % e) return - target = crashlog.create_target() + if debugger.GetNumTargets() > 0: + target = debugger.GetTargetAtIndex(0) + else: + target = crashlog.create_target() if not target: result.PutCString("error: couldn't create target") return
Index: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips =================================================================== --- lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips +++ lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/scripted_crashlog.ips @@ -21,8 +21,8 @@ "procExitAbsTime" : 6478056175721, "translated" : false, "cpuType" : "ARM-64", - "procName" : "scripted_crashlog_json.test.tmp.out", - "procPath" : "\/Users\/USER\/*\/scripted_crashlog_json.test.tmp.out", + "procName" : "@NAME@", + "procPath" : "@EXEC@", "parentProc" : "zsh", "parentPid" : 82132, "coalitionName" : "com.apple.Terminal", @@ -47,8 +47,9 @@ "base" : 4372692992, "size" : 16384, "uuid" : "b928ee77-9429-334f-ac88-41440bb3d4c7", - "path" : "\/Users\/USER\/*\/scripted_crashlog_json.test.tmp.out", - "name" : "scripted_crashlog_json.test.tmp.out" + "uuid" : "@UUID@", + "path" : "@EXEC@", + "name" : "@NAME@" }, { "source" : "P", Index: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips =================================================================== --- lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips +++ lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips @@ -21,8 +21,8 @@ "incident" : "FA21DF23-3344-4E45-BF27-4B8E63B7012B", "pid" : 72932, "cpuType" : "X86-64", - "procName" : "json.test.tmp.out", - "procPath" : "\/Users\/USER\/*\/json.test.tmp.out", + "procName" : "@NAME@", + "procPath" : "@EXEC@", "parentProc" : "fish", "parentPid" : 67002, "coalitionName" : "io.alacritty", Index: lldb/examples/python/crashlog.py =================================================================== --- lldb/examples/python/crashlog.py +++ lldb/examples/python/crashlog.py @@ -989,7 +989,10 @@ result.PutCString("error: python exception: %s" % e) return - target = crashlog.create_target() + if debugger.GetNumTargets() > 0: + target = debugger.GetTargetAtIndex(0) + else: + target = crashlog.create_target() if not target: result.PutCString("error: couldn't create target") return
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits