summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/tail_call_frames
AgeCommit message (Collapse)Author
2025-08-03[lldb][test] Skip tail_call_frames tests on older Clang versionsMichael Buch
These have been un-XFAILed in `ebe6eba62580592af7065a36b22d929c15291e9a`, but require following Clang fix: https://github.com/llvm/llvm-project/pull/150022. So skip older compilers.
2025-08-01[lldb][test] Un-XFAIL tail_call_frames tests on Linux arm/arm64Michael Buch
These have been XPASSing after https://github.com/llvm/llvm-project/pull/150022
2025-05-27[lldb][NFC] update API tests which skip/expect-fail armJason Molenda
The architectures provided to skipIf / expectedFail are regular expressions (v. _match_decorator_property() in decorators.py so on Darwin systems "arm64" would match the skips for "arm" (32-bit Linux). Update these to "arm$" to prevent this, and also update three tests (TestBuiltinFormats.py, TestCrossDSOTailCalls.py, TestCrossObjectTailCalls.py) that were skipped for arm64 via this behavior, and need to be skipped or they will fail. This was moviated by the new TestDynamicValue.py test which has an expected-fail for arm, but the test was passing on arm64 Darwin resulting in failure for the CIs.
2025-04-13[lldb][Format] Display only the inlined frame name in backtraces if ↵Michael Buch
available (#135343) When a frame is inlined, LLDB will display its name in backtraces as follows: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.3 * frame #0: 0x0000000100000398 a.out`func() [inlined] baz(x=10) at inline.cpp:1:42 frame #1: 0x0000000100000398 a.out`func() [inlined] bar() at inline.cpp:2:37 frame #2: 0x0000000100000398 a.out`func() at inline.cpp:4:15 frame #3: 0x00000001000003c0 a.out`main at inline.cpp:7:5 frame #4: 0x000000026eb29ab8 dyld`start + 6812 ``` The longer the names get the more confusing this gets because the first function name that appears is the parent frame. My assumption (which may need some more surveying) is that for the majority of cases we only care about the actual frame name (not the parent). So this patch removes all the special logic that prints the parent frame. Another quirk of the current format is that the inlined frame name does not abide by the `${function.name-XXX}` format variables. We always just print the raw demangled name. With this patch, we would format the inlined frame name according to the `frame-format` setting (see the test-cases). If we really want to have the `parentFrame [inlined] inlinedFrame` format, we could expose it through a new `frame-format` variable (e..g., `${function.inlined-at-name}` and let the user decide where to place things.
2024-10-16[lldb] Support tests with nested make invocations on Windows 2/2 (#112360)Stefan Gränitz
Following up from https://github.com/llvm/llvm-project/pull/112342, we roll out the fix and quote nested `make` invocations in all API tests.
2024-02-16[lldb] Replace assertEquals with assertEqual (NFC) (#82073)Jonas Devlieghere
assertEquals is a deprecated alias for assertEqual and has been removed in Python 3.12. This wasn't an issue previously because we used a vendored version of the unittest module. Now that we use the built-in version this gets updated together with the Python version used to run the test suite.
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2022-10-27[lldb][test] Remove empty setUp/tearDown methods (NFC)Dave Lee
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2022-06-02[lldb, test] Fix typos in the lldb testsVenkata Ramanaiah Nalamothu
Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D126596
2022-04-08Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON""Fangrui Song
(With C++ exceptions, `clang++ --target=mips64{,el}-linux-gnu -fpie -pie -fuse-ld=lld` has link errors (lld does not implement some strange R_MIPS_64 .eh_frame handling in GNU ld). However, sanitizer-x86_64-linux-qemu used this to build ScudoUnitTests. Pined ScudoUnitTests to -no-pie.) Default the option introduced in D113372 to ON to match all(?) major Linux distros. This matches GCC and improves consistency with Android and linux-musl which always default to PIE. Note: CLANG_DEFAULT_PIE_ON_LINUX may be removed in the future. Differential Revision: https://reviews.llvm.org/D120305
2022-04-07Revert "Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"""Nico Weber
This reverts commit 2aca33baf15926afe2520a06b1427a9894226fd2. Broke tests on several bots, see comments on https://reviews.llvm.org/D120305
2022-04-06Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON""Fangrui Song
(The upgrade of the ppc64le bot and D121257 have fixed compiler-rt failures. Tested by nemanjai.) Default the option introduced in D113372 to ON to match all(?) major Linux distros. This matches GCC and improves consistency with Android and linux-musl which always default to PIE. Note: CLANG_DEFAULT_PIE_ON_LINUX may be removed in the future. Differential Revision: https://reviews.llvm.org/D120305
2022-02-26Revert "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"Nikita Popov
See post-commit discussion on https://reviews.llvm.org/D120305. This change breaks the clang-ppc64le-rhel buildbot, though there is suspicion that it's an issue with the bot. The change also had a larger than expected impact on compile-time and code-size. This reverts commit 3c4ed02698afec021c6bca80740d1e58e3ee019e and some followup changes.
2022-02-25[LLDB] XFAIL TestUnambiguousTailCalls.py for Arm/LinuxMuhammad Omair Javaid
This patch marks TestUnambiguousTailCalls.py as XFAIL on Arm/Linux. Test started failing after 3c4ed02698afec021c6bca80740d1e58e3ee019e. Differential Revision: https://reviews.llvm.org/D120305
2022-01-23Rough guess at fixing lldb tests to handle Clang defaulting to DWARFv5David Blaikie
2021-06-22[lldb] Adjust Clang version requirements for tail_call_frames testsRaphael Isemann
Those tests are all failing for older Clang versions. This is adding the respective test decorators for the passing Clang versions to get the recently revived matrix bot green.
2021-02-06[lldb] Use assertIn/NotIn over assertTrue/False (NFC)Dave Lee
For improved failure messages, use `assertIn` over `assertTrue`. Differential Revision: https://reviews.llvm.org/D96095
2020-08-06[lldb] Use target.GetLaunchInfo() instead of creating an empty one.Jonas Devlieghere
Update tests that were creating an empty LaunchInfo instead of using the one coming from the target. This ensures target properties are honored.
2020-06-08[lldb/DWARF] Fix PC value for artificial tail call frames for the "GNU" casePavel Labath
Summary: The way that the support for the GNU dialect of tail call frames was implemented in D80519 meant that the were reporting very bogus PC values which pointed into the middle of an instruction: the -1 trick is necessary for the address to resolve to the right function, but we should still be reporting a more realistic PC value -- I say "realistic" and not "real", because it's very debatable what should be the correct PC value for frames like this. This patch achieves that my moving the -1 from SymbolFileDWARF into the stack frame computation code. The idea is that SymbolFileDWARF will merely report whether it has provided an address of the instruction after the tail call, or the address of the call instruction itself. The StackFrameList machinery uses this information to set the "behaves like frame zero" property of the artificial frames (the main thing this flag does is it controls the -1 subtraction when looking up the function address). This required a moderate refactor of the CallEdge class, because it was implicitly assuming that edges pointing after the call were real calls and those pointing the the call insn were tail calls. The class now carries this information explicitly -- it carries three mostly independent pieces of information: - an address of interest in the caller - a bit saying whether this address points to the call insn or after it - whether this is a tail call Reviewers: vsk, dblaikie Subscribers: aprantl, mgrang, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D81010
2020-06-02[lldb] Skip tests exercising DW_OP_GNU_entry_value with dsymutilPavel Labath
It seems that this opcode needs explicit support in dsymutil. Disable these tests until that is implemented.
2020-06-02[lldb/DWARF] Add support for pre-standard GNU call site attributesPavel Labath
Summary: The code changes are very straight-forward -- just handle both DW_AT_GNU and DW_AT_call versions of all tags and attributes. There is just one small gotcha: in the GNU version, DW_AT_low_pc was used both for the "return pc" and the "call pc" values, depending on whether the tag was describing a tail call, while the official scheme uses different attributes for the two things. Reviewers: vsk, dblaikie Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D80519
2020-03-24[lldb/DWARF] Reland: Use DW_AT_call_pc to determine artificial frame addressVedant Kumar
Reland with changes: the test modified in this change originally failed on a Debian/x86_64 builder, and I suspect the cause was that lldb looked up the line location for an artificial frame by subtracting 1 from the frame's address. For artificial frames, the subtraction must not happen because the address is already exact. --- lldb currently guesses the address to use when creating an artificial frame (i.e., a frame constructed by determining the sequence of (tail) calls which must have happened). Guessing the address creates problems -- use the actual address provided by the DW_AT_call_pc attribute instead. Depends on D76336. rdar://60307600 Differential Revision: https://reviews.llvm.org/D76337
2020-03-24Revert "[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address"Vedant Kumar
This reverts commit 6905394d153960ded3a7b884a9747ed2d4a6e8d8. The changed test is failing on Debian/x86_64, possibly because lldb is subtracting an offset from the DW_AT_call_pc address used for the artificial frame: http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/7171/steps/test/logs/stdio /home/worker/lldb-x86_64-debian/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/main.cpp:6:17: error: CHECK-NEXT: expected string not found in input // CHECK-NEXT: frame #1: 0x{{[0-9a-f]+}} a.out`func3() at main.cpp:14:3 [opt] [artificial] ^ <stdin>:3:2: note: scanning from here frame #1: 0x0000000000401127 a.out`func3() at main.cpp:13:4 [opt] [artificial]
2020-03-24[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame addressVedant Kumar
lldb currently guesses the address to use when creating an artificial frame (i.e., a frame constructed by determining the sequence of (tail) calls which must have happened). Guessing the address creates problems -- use the actual address provided by the DW_AT_call_pc attribute instead. Depends on D76336. rdar://60307600 Differential Revision: https://reviews.llvm.org/D76337
2020-02-20[lldb] Remove license headers from all test source filesRaphael Isemann
Summary: Around a third of our test sources have LLVM license headers. This patch removes those headers from all test sources and also fixes any tests that depended on the length of the license header. The reasons for this are: * A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers. * No other LLVM project is putting license headers in its test files to my knowledge. * They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source. For the record, the following tests had their line numbers changed to pass with the removal of the license header: lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-shell :: Reproducer/TestGDBRemoteRepro.test lldb-shell :: Reproducer/TestMultipleTargets.test lldb-shell :: Reproducer/TestReuseDirectory.test lldb-shell :: ExecControl/StopHook/stop-hook-threads.test lldb-shell :: ExecControl/StopHook/stop-hook.test lldb-api :: lang/objc/exceptions/TestObjCExceptions.py Reviewers: #lldb, espindola, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74839
2020-02-11[lldb][test] Remove symlink for API tests.Jordan Rupprecht
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ``` lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure. Reviewers: labath, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151