[Lldb-commits] [lldb] [lldb][test] Use external debug info on Arm in TestExitDuringStep and TestThreadExit (PR #228047)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 1 04:44:25 PDT 2026
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/228047
Arm has to care about Arm and Thumb modes, so without the separate debug info file installed by libc6-dbg on Linux, we cannot backtrace if the starting point is in a libc function.
This is the case for these tests where a thread may be stopped in a libc syscall wrapper.
As the backtrace wasn't working, the code added by #227312 did not see that some threads were part of the main executable, which made both these tests fail on Arm Linux.
It's possible we should be running more tests on Arm with this option on, but for now I just want to get the bot back to green.
More details in https://github.com/llvm/llvm-project/issues/228014.
>From 6d1282c25e4ef6f689b6cc8e5f4ec81abd9b7882 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Thu, 1 Oct 2026 11:35:30 +0000
Subject: [PATCH] [lldb][test] Use external debug info on Arm in
TestExitDuringStep and TestThreadExit
Arm has to care about Arm and Thumb modes, so without the separate debug info
file installed by libc6-dbg on Linux, we cannot backtrace if the starting point
is in a libc function.
This is the case for these tests where a thread may be stopped in a libc syscall
wrapper.
As the backtrace wasn't working, the code added by #227312 did not see that
some threads were part of the main executable, which made both these tests fail
on Arm Linux.
It's possible we should be running more tests on Arm with this option on, but
for now I just want to get the bot back to green.
More details in https://github.com/llvm/llvm-project/issues/228014.
---
.../thread/exit_during_step/TestExitDuringStep.py | 5 +++++
.../API/functionalities/thread/thread_exit/TestThreadExit.py | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py b/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
index 9822559a73b91..6fd00fc306c3e 100644
--- a/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
+++ b/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
@@ -44,6 +44,11 @@ def setUp(self):
def exit_during_step_base(self, step_cmd, step_stop_reason, by_instruction):
"""Test thread exit during step handling."""
+ if self.getArchitecture().lower() == "arm":
+ # We require a separate debug info file to be able to backtrace starting
+ # from a libc function. This file is provided by libc6-dbg on Linux.
+ self.runCmd("settings set symbols.enable-external-lookup true")
+
exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/API/functionalities/thread/thread_exit/TestThreadExit.py b/lldb/test/API/functionalities/thread/thread_exit/TestThreadExit.py
index aa62112935649..75bf443b7360c 100644
--- a/lldb/test/API/functionalities/thread/thread_exit/TestThreadExit.py
+++ b/lldb/test/API/functionalities/thread/thread_exit/TestThreadExit.py
@@ -27,6 +27,11 @@ def thread_ids(threads):
@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
def test(self):
"""Test thread exit handling."""
+ if self.getArchitecture().lower() == "arm":
+ # We require a separate debug info file to be able to backtrace starting
+ # from a libc function. This file is provided by libc6-dbg on Linux.
+ self.runCmd("settings set symbols.enable-external-lookup true")
+
self.build()
exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
More information about the lldb-commits
mailing list