Skip to content

Commit 897d03a

Browse files
author
git apple-llvm automerger
committed
Merge commit 'daeb4ab72a2e' from swift/release/6.0 into stable/20230725
2 parents 40ee301 + daeb4ab commit 897d03a

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

lldb/examples/python/crashlog.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ def load_images(self, options, loaded_images=None):
543543
for image in self.images:
544544
image.resolve = True
545545
elif options.crashed_only:
546+
images_to_load = []
546547
for thread in self.threads:
547-
if thread.did_crash():
548-
images_to_load = []
548+
if thread.did_crash() or thread.app_specific_backtrace:
549549
for ident in thread.idents:
550550
for image in self.find_images_with_identifier(ident):
551551
image.resolve = True
@@ -860,7 +860,7 @@ def parse_app_specific_backtraces(self, json_app_specific_bts):
860860
thread = self.crashlog.Thread(
861861
len(self.crashlog.threads), True, self.crashlog.process_arch
862862
)
863-
thread.queue = "Application Specific Backtrace"
863+
thread.name = "Application Specific Backtrace"
864864
if self.parse_asi_backtrace(thread, json_app_specific_bts[0]):
865865
self.crashlog.threads.append(thread)
866866
else:
@@ -870,7 +870,7 @@ def parse_last_exception_backtraces(self, json_last_exc_bts):
870870
thread = self.crashlog.Thread(
871871
len(self.crashlog.threads), True, self.crashlog.process_arch
872872
)
873-
thread.queue = "Last Exception Backtrace"
873+
thread.name = "Last Exception Backtrace"
874874
self.parse_frames(thread, json_last_exc_bts)
875875
self.crashlog.threads.append(thread)
876876

@@ -1170,11 +1170,13 @@ def parse_normal(self, line):
11701170
self.thread = self.crashlog.Thread(
11711171
idx, True, self.crashlog.process_arch
11721172
)
1173+
self.thread.name = "Application Specific Backtrace"
11731174
elif line.startswith("Last Exception Backtrace:"): # iOS
11741175
self.parse_mode = self.CrashLogParseMode.THREAD
11751176
self.app_specific_backtrace = True
11761177
idx = 1
11771178
self.thread = self.crashlog.Thread(idx, True, self.crashlog.process_arch)
1179+
self.thread.name = "Last Exception Backtrace"
11781180
self.crashlog.info_lines.append(line.strip())
11791181

11801182
def parse_thread(self, line):

lldb/examples/python/crashlog_scripted_process.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ def __init__(self, process, args, crashlog_thread):
173173
self.backing_thread = crashlog_thread
174174
self.idx = self.backing_thread.index
175175
self.tid = self.backing_thread.id
176-
if self.backing_thread.app_specific_backtrace:
177-
self.name = "Application Specific Backtrace"
178-
else:
179-
self.name = self.backing_thread.name
176+
self.name = self.backing_thread.name
180177
self.queue = self.backing_thread.queue
181178
self.has_crashed = self.originating_process.crashed_thread_idx == self.idx
182179
self.create_stackframes()

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/app_specific_backtrace_crashlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/application_specific_info/asi.yaml > %t.dir/asi
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/asi %S/Inputs/application_specific_info/asi.txt' \
6+
# RUN: -o 'crashlog -i -t %t.dir/asi %S/Inputs/application_specific_info/asi.txt' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/last_exception_backtrace_crashlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/application_specific_info/asi.yaml > %t.dir/asi
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/asi %S/Inputs/application_specific_info/leb.txt' \
6+
# RUN: -o 'crashlog -i -t %t.dir/asi %S/Inputs/application_specific_info/leb.txt' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

0 commit comments

Comments
 (0)