summaryrefslogtreecommitdiff
path: root/lldb/test/API
AgeCommit message (Collapse)Author
2025-11-20[lldb] Fix a test if hardware breakpoints are not supported (#168813)Igor Kudrin
If `HardwareBreakpointTestBase.supports_hw_breakpoints()` returns False, `SimpleHWBreakpointTest.does_not_support_hw_breakpoints()` returns None, so the test runs and fails. However, it should be skipped instead. The test was added in #146602, while `supports_hw_breakpoints()` was changed in #146609, which was landed earlier despite having a bigger number.
2025-11-19[lldb][test] Correctly skip a test on a 32-bit target (#168631)Igor Kudrin
The test was added in #147252. On a 32-bit target, it fails with error: ``` File "...\TestDataFormatterLibcxxInvalidString.py", line 23, in test self.skip() ^^^^^^^^^ AttributeError: 'LibcxxInvalidStringDataFormatterTestCase' object has no attribute 'skip' ```
2025-11-19[lldb] Skip TestLibcxxInternalsRecognizer on asan + MacOSFelipe de Azevedo Piovezan
Unfortunately, in this configuration, the bots are forced to use the system libcxx, which is too old for what this test is verifying. In the future, we should re-enable building libcxx with asan on MacOS.
2025-11-17[LLDB] Fix test compilation errors under asan (NFC) (#168408)Adrian Prantl
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-sanitized/2744/consoleText
2025-11-17[lldb-dap] Migrating 'evaluate' to structured types. (#167720)John Harrison
Adding structured types for the evaluate request handler. This should be mostly a non-functional change. I did catch some spelling mistakes in our tests ('variable' vs 'variables').
2025-11-17[LLDB][DWARF] Use the same qualified name computation for Rust (#165840)Kiva
Currently LLDB's `ParseRustVariantPart` generates the following `CXXRecordDecl` for a Rust enum ```rust enum AA { A(u8) } ``` ``` CXXRecordDecl 0x5555568d5970 <<invalid sloc>> <invalid sloc> struct AA |-CXXRecordDecl 0x5555568d5ab0 <<invalid sloc>> <invalid sloc> union test_issue::AA$Inner definition | |-CXXRecordDecl 0x5555568d5d18 <<invalid sloc>> <invalid sloc> struct A$Variant definition | | |-DefinitionData pass_in_registers aggregate standard_layout trivially_copyable trivial | | | `-Destructor simple irrelevant trivial needs_implicit | | `-FieldDecl 0x555555a77880 <<invalid sloc>> <invalid sloc> value 'test_issue::AA::A' | `-FieldDecl 0x555555a778f0 <<invalid sloc>> <invalid sloc> $variant$ 'test_issue::AA::test_issue::AA$Inner::A$Variant' |-CXXRecordDecl 0x5555568d5c48 <<invalid sloc>> <invalid sloc> struct A definition | `-FieldDecl 0x555555a777e0 <<invalid sloc>> <invalid sloc> __0 'unsigned char' `-FieldDecl 0x555555a77960 <<invalid sloc>> <invalid sloc> $variants$ 'test_issue::AA::test_issue::AA$Inner' ``` While when the Rust enum type name is the same as its variant name, the generated `CXXRecordDecl` becomes the following – there's a circular reference between `struct A$Variant` and `struct A`, causing #163048. ```rust enum A { A(u8) } ``` ``` CXXRecordDecl 0x5555568d5760 <<invalid sloc>> <invalid sloc> struct A |-CXXRecordDecl 0x5555568d58a0 <<invalid sloc>> <invalid sloc> union test_issue::A$Inner definition | |-CXXRecordDecl 0x5555568d5a38 <<invalid sloc>> <invalid sloc> struct A$Variant definition | | `-FieldDecl 0x5555568d5b70 <<invalid sloc>> <invalid sloc> value 'test_issue::A' <---- bug here | `-FieldDecl 0x5555568d5be0 <<invalid sloc>> <invalid sloc> $variant$ 'test_issue::A::test_issue::A$Inner::A$Variant' `-FieldDecl 0x5555568d5c50 <<invalid sloc>> <invalid sloc> $variants$ 'test_issue::A::test_issue::A$Inner' ``` The problem was caused by `GetUniqueTypeNameAndDeclaration` not returning the correct qualified name for DWARF DIE `test_issue::A::A`, instead, it returned `A`. This caused `ParseStructureLikeDIE` to find the wrong type `test_issue::A` and returned early. The failure in `GetUniqueTypeNameAndDeclaration` appears to stem from a language check that returns early unless the language is C++. I changed it so Rust follows the C++ path rather than returning. I’m not entirely sure this is the right approach — Rust’s qualified name rules look similar, but not identical? Alternatively, we could add a Rust-specific implementation that forms qualified names according to Rust's rules.
2025-11-14[lldb] Add a test for capturing stdout/stderr from Python commands (#168138)Jonas Devlieghere
2025-11-13[LLDB] Use skipIf instead of expectedFailAdrian Prantl
2025-11-13[lldb] Add libstdcpp initializer_list formatter (#167515)Ebuka Ezike
Make the existing libc++ formatter generic Add initializer_list summary provider. Add test for `libstdcpp`
2025-11-12[lldb] Remove test that disassembles all of Foundation (#167596)Alex Langford
This test attempts to disassemble every Code symbol in Foundation. There's no need to disassemble every code symbol and this certainly does not scale. In some cases, this test can take multiple minutes to run or even time out.
2025-11-12Revert "[lldb] Introduce ScriptedFrameProvider for real threads" (#167662)Michael Buch
The new test fails on x86 and arm64 public macOS bots: ``` 09:27:59 ====================================================================== 09:27:59 FAIL: test_append_frames (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that we can add frames after real stack. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 122, in test_append_frames 09:27:59 self.assertEqual(new_frame_count, original_frame_count + 1) 09:27:59 AssertionError: 5 != 6 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ====================================================================== 09:27:59 FAIL: test_applies_to_thread (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that applies_to_thread filters which threads get the provider. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 218, in test_applies_to_thread 09:27:59 self.assertEqual( 09:27:59 AssertionError: 5 != 1 : Thread with ID 1 should have 1 synthetic frame 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ====================================================================== 09:27:59 FAIL: test_prepend_frames (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that we can add frames before real stack. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 84, in test_prepend_frames 09:27:59 self.assertEqual(new_frame_count, original_frame_count + 2) 09:27:59 AssertionError: 5 != 7 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ====================================================================== 09:27:59 FAIL: test_remove_frame_provider_by_id (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that RemoveScriptedFrameProvider removes a specific provider by ID. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 272, in test_remove_frame_provider_by_id 09:27:59 self.assertEqual(thread.GetNumFrames(), 3, "Should have 3 synthetic frames") 09:27:59 AssertionError: 5 != 3 : Should have 3 synthetic frames 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ====================================================================== 09:27:59 FAIL: test_replace_all_frames (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that we can replace the entire stack. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 41, in test_replace_all_frames 09:27:59 self.assertEqual(thread.GetNumFrames(), 3, "Should have 3 synthetic frames") 09:27:59 AssertionError: 5 != 3 : Should have 3 synthetic frames 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ====================================================================== 09:27:59 FAIL: test_scripted_frame_objects (TestScriptedFrameProvider.ScriptedFrameProviderTestCase) 09:27:59 Test that provider can return ScriptedFrame objects. 09:27:59 ---------------------------------------------------------------------- 09:27:59 Traceback (most recent call last): 09:27:59 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py", line 159, in test_scripted_frame_objects 09:27:59 self.assertEqual(frame0.GetFunctionName(), "custom_scripted_frame_0") 09:27:59 AssertionError: 'thread_func(int)' != 'custom_scripted_frame_0' 09:27:59 - thread_func(int) 09:27:59 + custom_scripted_frame_0 09:27:59 09:27:59 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang 09:27:59 ---------------------------------------------------------------------- 09:27:59 Ran 6 tests in 14.242s 09:27:59 09:27:59 FAILED (failures=6) ``` Reverts llvm/llvm-project#161870
2025-11-11[libunwind] Fix execution flow imbalance when using C++ Exceptions (#165066)Med Ismail Bennani
2025-11-12Fix lldb-dap non-leaf frame source resolution issue (#165944)jeffreytan81
Summary ------- While dogfooding lldb-dap, I observed that VSCode frequently displays certain stack frames as greyed out. Although these frames have valid debug information, double-clicking them shows disassembly instead of source code. However, running `bt` from the LLDB command line correctly displays source file and line information for these same frames, indicating this is an lldb-dap specific issue. Root Cause ---------- Investigation revealed that `DAP::ResolveSource()` incorrectly uses a frame's PC address directly to determine whether valid source line information exists. This approach works for leaf frames, but fails for non-leaf (caller) frames where the PC points to the return address immediately after a call instruction. This return address may fall into compiler-generated code with no associated line information, even though the actual call site has valid source location data. The correct approach is to use the symbol context's line entry, which LLDB resolves by effectively checking PC-1 for non-leaf frames, properly identifying the line information for the call instruction rather than the return address. Testing ------- Manually tested with VSCode debugging sessions on production workloads. Verified that non-leaf frames now correctly display source code instead of disassembly view. Before the change symptom: <img width="1013" height="216" alt="image" src="https://github.com/user-attachments/assets/9487fbc0-f438-4892-a8d2-1437dc25399b" /> And here is after the fix: <img width="1068" height="198" alt="image" src="https://github.com/user-attachments/assets/0d2ebaa7-cca6-4983-a1d1-1a26ae62c86f" /> --------- Co-authored-by: Jeffrey Tan <jeffreytan@fb.com>
2025-11-11[lldb] Introduce ScriptedFrameProvider for real threads (#161870)Med Ismail Bennani
This patch extends ScriptedFrame to work with real (non-scripted) threads, enabling frame providers to synthesize frames for native processes. Previously, ScriptedFrame only worked within ScriptedProcess/ScriptedThread contexts. This patch decouples ScriptedFrame from ScriptedThread, allowing users to augment or replace stack frames in real debugging sessions for use cases like custom calling conventions, reconstructing corrupted frames from core files, or adding diagnostic frames. Key changes: - ScriptedFrame::Create() now accepts ThreadSP instead of requiring ScriptedThread, extracting architecture from the target triple rather than ScriptedProcess.arch - Added SBTarget::RegisterScriptedFrameProvider() and ClearScriptedFrameProvider() APIs, with Target storing a SyntheticFrameProviderDescriptor template for new threads - Added "target frame-provider register/clear" commands for CLI access - Thread class gains LoadScriptedFrameProvider(), ClearScriptedFrameProvider(), and GetFrameProvider() methods for per-thread frame provider management - New SyntheticStackFrameList overrides FetchFramesUpTo() to lazily provide frames from either the frame provider or the real stack This enables practical use of the SyntheticFrameProvider infrastructure in real debugging workflows. rdar://161834688 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2025-11-11[lldb][test] Fix ThreadStepUntilAPI.pyDavid Spickett
After #167359 / 95db31e7f69e7008f0c570ed30d54d1e418e10f2. A fix was attempted in #167423 but was not quite enough. From what I could understand, in v1 format you have to specify all the basic blocks. Where before !call_me implied they were all cold (I think, very shaky understanding here). For this test we want to see blocks like call_me/foo/call_me. So adding a line for block 1 fixes the tests. It could produce more blocks at some point but I think as long as foo is within two of them, it'll be fine.
2025-11-10[LLDB] Fix lldb failure caused by 95db31e7f6. (#167423)Rahman Lavaee
2025-11-10[lldb] Fix TestLocationsAfterRebuild test (#167402)GeorgeHuyubo
After commit fce58897ce82 enabled the locate_module callback for main executables, the TestLocationsAfterRebuild.py test started failing on remote platforms. The test was hardcoded to expect breakpoint location "1.3" to exist after three rebuilds, but the new module loading behavior changed how breakpoint locations are managed. This patch fixes the test by: - Removing the @skipIfRemote decorator to re-enable testing on remote platforms - Dynamically querying the actual number of breakpoint locations instead of assuming a specific count - Using loc.GetID() to get actual location IDs rather than assuming sequential IDs (1, 2, 3) - Iterating through all valid locations and verifying each can be disabled/enabled The fix maintains the original test intent (validating that breakpoint location IDs remain valid after rebuilds) while adapting to the new module loading behavior where the number and IDs of locations may vary across platforms. Co-authored-by: George Hu <georgehuyubo@gmail.com>
2025-11-10[lldb] Disable TestLocationsAfterRebuild for remote targets (#167239)Dmitry Vasilyev
#160199 broke buildbots `lldb-remote-linux-ubuntu` and `lldb-remote-linux-win`. This patch must make these buildbots green for now.
2025-11-08[lldb][ClangModulesDeclVendor] Print Clang module loading errors to ↵Michael Buch
expression log instead of console (#166964) Depends on: * https://github.com/llvm/llvm-project/pull/166917 * https://github.com/llvm/llvm-project/pull/166940 While these errors can contribute to an expression failing, they are never *the* reason the expression failed. I.e., they are always just 'note:' diagnostics that we hand-emit. Because they are quite noisy (and we potentially have many of them if we auto-load all modules in a CU), this patch logs the errors to the `expr` log, instead of the console. Previously these errors would only get omitted when the expression itself failed. Meaning if the expression failed, we'd dump these 'note' module load errors in next to the actual expression error, obscuring the output. Moreover, if the expression succeeded, any module load errors would be dropped. Now we always log all module loading errors to the expression log, regardless of whether the expression fails or not.
2025-11-07Fix a crash when a stop hook deletes itself in its callback. (#160416)jimingham
We're iterating over the stop hooks so if one of them changes the stop hook list by deleting itself or another stop hook, that invalidates our iterator. I chose to fix this by making a copy of the stop hook list and iterating over that. That's a cheap operation since this is just an array of shared pointers. But more importantly doing it this way means that if on a stop where one stop hook deletes another, the deleted hook will always get a chance to run. If you iterated over the list itself, then whether that to be deleted hook gets to run would be dependent on whether it was before or after the deleting stop hook, which would be confusing.
2025-11-07[lldb] Correctly detach (rather than kill) when connecting with gdb-remote ↵Jonas Devlieghere
(#166869) We weren't setting `m_should_detach` when going through the `DoConnectRemote` code path. This meant that when you would attaches to a remote process with `gdb-remote <port>` and use Ctrl+D, it would kill the process instead of detach from it. rdar://156111423
2025-11-07[LLDB] Run MSVC STL string(-view) tests with PDB (#166833)nerix
PDB doesn't include the typedefs for types, so all types use their full name. For `std::string` and friends, this means they show up as `std::basic_string<char, std::char_traits<char>, std::allocator<char>>`. This PR updates the `std::{,w,u8,u16,u32}string(_view)` tests to account for this and runs them with PDB.
2025-11-07[LLDB][Editline] empty current line before `el_wgets` (#165830)Kiva
This PR fixes #157637 by printing ANSI sequence "\r\x1b[K" to empty the line before calling to `el_wgets`. Later when `el_wgets` prints the real prompt, all wrongly printed characters are removed from the terminal.
2025-11-06[LLDB] Fix debuginfo ELF files overwriting Unified Section List (#166635)Jacob Lalonde
Recently I've been deep diving ELF cores in LLDB, aspiring to move LLDB closer to GDB in capability. One issue I encountered was a system lib losing it's unwind plan when loading the debuginfo. The reason for this was the debuginfo has the eh_frame section stripped and the main executable did not. The root cause of this was this line in [ObjectFileElf](https://github.com/llvm/llvm-project/blob/163933e9e7099f352ff8df1973f9a9c3d7def6c5/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp#L1972) ``` // For eTypeDebugInfo files, the Symbol Vendor will take care of updating the // unified section list. if (GetType() != eTypeDebugInfo) unified_section_list = *m_sections_up; ``` This would always be executed because CalculateType can never return an eTypeDebugInfo ``` ObjectFile::Type ObjectFileELF::CalculateType() { switch (m_header.e_type) { case llvm::ELF::ET_NONE: // 0 - No file type return eTypeUnknown; case llvm::ELF::ET_REL: // 1 - Relocatable file return eTypeObjectFile; case llvm::ELF::ET_EXEC: // 2 - Executable file return eTypeExecutable; case llvm::ELF::ET_DYN: // 3 - Shared object file return eTypeSharedLibrary; case ET_CORE: // 4 - Core file return eTypeCoreFile; default: break; } return eTypeUnknown; } ``` This makes sense as there isn't a explicit sh_type to denote that this file is a debuginfo. After some discussion with @clayborg and @GeorgeHuyubo we settled on joining the exciting unified section list with whatever new sections were being added. Adding each new unique section, or taking the section with the maximum file size. We picked this strategy to pick the section with the most information. In most scenarios, LHS should be SHT_NOBITS and RHS would be SHT_PROGBITS. Here is a diagram documenting the existing vs proposed new way. <img width="1666" height="1093" alt="image" src="https://github.com/user-attachments/assets/73ba9620-c737-439e-9934-ac350d88a3b5" />
2025-11-06[LLDB] Run working STL data formatter tests with PDB (#166812)nerix
This enables testing with PDB for all tests that don't require any changes to pass. I ran the `lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic` tests locally and they passed.
2025-11-05[lldb] Introduce SBFrameList for lazy frame iteration (#166651)Med Ismail Bennani
This patch introduces `SBFrameList`, a new SBAPI class that allows iterating over stack frames lazily without calling `SBThread::GetFrameAtIndex` in a loop. The new `SBThread::GetFrames()` method returns an `SBFrameList` that supports Python iteration (`for frame in frame_list:`), indexing (`frame_list[0]`, `frame_list[-1]`), and length queries (`len()`). The implementation uses `StackFrameListSP` as the opaque pointer, sharing the thread's underlying frame list to ensure frames are materialized on-demand. This is particularly useful for ScriptedFrameProviders, where user scripts will be to iterate, filter, and replace frames lazily without materializing the entire stack upfront. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2025-11-04[lldb] Skip tests on older versions of clangAdrian Prantl
2025-11-04[LLDB] Run API tests with PDB too (#149305)nerix
From https://github.com/llvm/llvm-project/pull/148554#issuecomment-3083261858 - this adds an option for API tests to be run with the both PDB readers on Windows. As there are a lot of failures with PDB, this is an opt-in per test. To get PDB, `-g -gcodeview` has to be used on Clang. `-gcodeview` alone isn't enough, because it won't cause clang to pass `-debug` to the linker. #149498 tracks the (currently) failing tests.
2025-11-04[lldb-dap] Addressing orphaned processes in tests. (#166205)John Harrison
In lldb-dap tests, we sometimes spawn subprocesses directly but do not always correctly clean them up. This can cause some tests, like the `TestDAP_disconnect.test_attach` to hang and not properly respect timeouts. To fix this, I am passing the `lldbtest.Base.spawnSubprocess` helper to the adapter client so it can be used spawn subprocesses in a way that we can ensure they're cleaned up.
2025-11-04[lldb] When starting in a hidden frame, don't skip over hidden frames when ↵Michael Buch
navigating up/down (#166394) When stopped in a hidden frame (either because we selected the hidden frame or hit a breakpoint inside it), a user most likely is intersted in exploring the immediate frames around it. But currently issuing `up`/`down` commands will unconditionally skip over all hidden frames. This patch makes it so `up`/`down` commands don't skip hidden frames if the frame we started it was a hidden frame.
2025-11-03[lldb] Skip tests on older versions of clangAdrian Prantl
2025-10-31[lldb-dap] Correctly trigger 'entry' stop reasons. (#165901)John Harrison
Noticed this while looking into test stability that the 'entry' stop reason is not triggering correctly. This should ensure we correctly trigger the 'entry' stop reason when launching a process with `"stopOnEntry": true`. I've also updated the tests to ensure we receive the 'entry' stop reason to catch this regression.
2025-10-31Revert "Reland "[lldb-dap] Improving consistency of tests by removing… ↵Aiden Grossman
(#165892) … concurrency." (#165688)"" This reverts commit 17dbd8690e36f8e514fb47f4418f78420d0fc019. This was causing timeouts on the premerge runners. Reverting for now until the timeouts trigger within lit and/or we have a better testing strategy for this.
2025-10-31[LLDB][NativePDB] Estimate symbol sizes (#165727)nerix
In #165604, a test was skipped on Windows, because the native PDB plugin didn't set sizes on symbols. While the test isn't compiled with debug info, it's linked with `-gdwarf`, causing a PDB to be created on Windows. This PDB will only contain the public symbols (written by the linker) and section information. The symbols themselves don't have a size, however the DIA SDK sets a size for them. It seems like, for these data symbols, the size given from DIA is the distance to the next symbol (or the section end). This PR implements the naive approach for the native plugin. The main difference is in function/code symbols. There, DIA searches for a corresponding `S_GPROC32` which have a "code size" that is sometimes slightly smaller than the difference to the next symbol.
2025-10-31🍒 [lldb] Fix TestRealDefinition on older DWARF versions (#165729)Michael Buch
Cherry-picks this fix from the Apple LLDB fork. Ever since we upstreamed https://github.com/llvm/llvm-project/pull/164011, this test is failing on our pre-DWARFv5 bots: ``` 13:47:54 ====================================================================== 13:47:54 FAIL: test_frame_var_after_stop_at_implementation_dsym (TestRealDefinition.TestRealDefinition) 13:47:54 Test that we can find the implementation for an objective C type 13:47:54 ---------------------------------------------------------------------- 13:47:54 Traceback (most recent call last): 13:47:54 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1804, in test_method 13:47:54 return attrvalue(self) 13:47:54 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/test/API/lang/objc/real-definition/TestRealDefinition.py", line 60, in test_frame_var_after_stop_at_implementation 13:47:54 self.expect( 13:47:54 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2416, in expect 13:47:54 self.runCmd( 13:47:54 File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1006, in runCmd 13:47:54 self.assertTrue(self.res.Succeeded(), msg + output) 13:47:54 AssertionError: False is not true : Variable(s) displayed correctly 13:47:54 Error output: 13:47:54 error: <user expression 0>:1:12: "_hidden_ivar" is not a member of "(id) _bar" 13:47:54 1 | foo->_bar->_hidden_ivar 13:47:54 | ^ ``` Original commit message: For a while, tests were run with `target.prefer-dynamic-value` overridden to `no-dynamic-values` – but the override was removed in [D132382](https://reviews.llvm.org/D132382). At that time, tests that failed were individually opted in to `no-dynamic-values`. I don't recall specifics about `TestRealDefinition`, but it currently fails with `no-dynamic-values`, and that is correct behavior. This change removes the `no-dynamic-values` override.
2025-10-30[lldb] Add alternative SBThread::GetStopDescription (#165379)Ebuka Ezike
the function signature for `GetStopDescription` is `lldb::SBThread::GetStopDescription(char *dst_or_null, size_t len)`. To get a description you need to call the function first time to get the buffer size. a second time to get the description. This is little worse from the python size as the signature is `lldb.SBThread.GetStopDescription(int: len) -> list[str]` the user has to pass the max size as possible with no way of checking if it is enough. This patch adds a new api `lldb.SBThread.GetStopDescription(desc: lldb.SBStream()) -> bool` `bool lldb::SBThread::GetStopDescription(lldb::SBStream &description)` which handles this case. Adds new Test case for lua.
2025-10-30[NFCI][lldb][test] Fix mismatched C/C++ substitutions (#165773)Raul Tambre
Most of the cases were where a C++ file was being compiled with the C substitution. There were a few cases of the opposite though. LLDB seems to be the only real culprit in the LLVM codebase for these mismatches. Rest of the LLVM presumably sticks at least language-specific options in the common substitutions making the mistakes immediately apparent. I found these by using Clang frontend configuration files containing language-specific options for both C and C++ (e.g. `-std=c2y` and `-std=c++26`).
2025-10-30Reland "[lldb-dap] Improving consistency of tests by removing concurrency." ↵David Spickett
(#165688)" This reverts commit f205be095609aa61dfac3ae729406e0af2dcd15f. This new select mechanism has exposed the fact that the resources the Arm Linux bot has can vary a lot. We do limit it to a low number of parallel tests but in this case, I think it's write performance somewhere. Reland the changes since they work elsewhere, and disable lldb-dap tests on Arm Linux while I fix our buildbot.
2025-10-30[lldb][AArch64][test] Require SVE for some Linux testsDavid Spickett
These tests had only ever been run on SVE or SVE+SME systems. While investigating #138717 I found they failed on an SME only system. This happens because before the first stop we try to initialise SVE registers while outside of streaming mode. Which causes a SIGILL. To fix this, require SVE to be present. I could go in and make these work on SME only, but it's more complex and I will be adding SME only specific tests in future anyway.
2025-10-30[lldb][test] Fix libc++ API tests on older Clang versionsMichael Buch
Both of these fail on our Clang-19 macOS bots.
2025-10-30[lldb-dap][test] skip io_redirection in debug builds (#165593)Ebuka Ezike
Currently all `runInTerminal` test are skipped in debug builds because, when attaching it times out parsing the debug symbols of lldb-dap. Add this test since it is running in teminal.
2025-10-30Revert "[lldb-dap] Improving consistency of tests by removing concurrency." ↵David Spickett
(#165688) Reverts llvm/llvm-project#165496 Due to flaky failures on Arm 32-bit since this change. Detailed in https://github.com/llvm/llvm-project/pull/165496#issuecomment-3467209089.
2025-10-29[lldb-dap] Improving consistency of tests by removing concurrency. (#165496)John Harrison
We currently use a background thread to read the DAP output. This means the test thread and the background thread can race at times and we may have inconsistent timing due to these races. To improve the consistency I've removed the reader thread and instead switched to using the `selectors` module that wraps `select` in a platform independent way.
2025-10-29[lldb-dap] Report any errors during attach request (#165270)Ebuka Ezike
Attaching using `core`, `gdbremote` or `attachInfo` may have an error. fail early if it does.
2025-10-29[LLDB] Skip TestMultipleSlides.py on Windows (#165604)nerix
After the default PDB plugin changed to the native one (#165363), this test failed, because it uses the size of public symbols and the native plugin sets the size to 0 (as PDB doesn't include this information explicitly). A PDB was built because the final executable in that test was linked with `-gdwarf`.
2025-10-28[lldb] The test added for PR#164905 doesn't run on Windows host. (#165417)Dmitry Vasilyev
Skip the test for Windows hosts. This patch fixes the buildbot `lldb-remote-linux-win`. https://lab.llvm.org/buildbot/#/builders/197/builds/10304
2025-10-28[lldb][test] Avoid Windows import error in TestDriverWithClosedSTDIO.pyDavid Spickett
Test added in #164905, skipped by #165318, but that change did not guard the import. This import is run when we parse the file which happens before any skips are applied.
2025-10-27[LLDB] Remove signature from python copy when injecting ASAN runtimeAdrian Prantl
2025-10-27The test added for PR#164905 doesn't run on Windows. (#165318)jimingham
2025-10-27[LLDB] Fix condition in testAdrian Prantl