[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb] Delete TestStandardUnwindIt's been broken (not failing, but not testing anything either) forquite some time now, and nobody noticed. It also (by design) testsstepping through libc code, wh
[lldb] Delete TestStandardUnwindIt's been broken (not failing, but not testing anything either) forquite some time now, and nobody noticed. It also (by design) testsstepping through libc code, which makes it completely non-hermetic.It's not worth reviving such a test.
Disable TestAArch64UnwindPAC.py for non PAC targetsTestAArch64UnwindPAC.py started failing on LLDB buildbot as underlyinghardware does not support PAC. This patch skips this test for targetswhich
Disable TestAArch64UnwindPAC.py for non PAC targetsTestAArch64UnwindPAC.py started failing on LLDB buildbot as underlyinghardware does not support PAC. This patch skips this test for targetswhich do not support PAC feature.
AArch64 Linux and elf-core PAC stack unwinder supportThis patch builds on D100521 and other related patches to add supportfor unwinding stack on AArch64 systems with pointer authenticationfeature
AArch64 Linux and elf-core PAC stack unwinder supportThis patch builds on D100521 and other related patches to add supportfor unwinding stack on AArch64 systems with pointer authenticationfeature enabled.We override FixCodeAddress and FixDataAddress function in ABISysV_arm64class. We now try to calculate and set code and data masks after readingdata_mask and code_mask registers exposed by AArch64 targets running Linux.This patch utilizes core file linux-aarch64-pac.core for testing thatLLDB can successfully unwind stack frames in the presence of signedreturn address after masking off ignored bits.This patch also includes a AArch64 Linux native test case to demonstratesuccessful back trace calculation in presence of pointer authenticationfeature.Differential Revision: https://reviews.llvm.org/D99944
[lldb] Require x86 for unwind no-return testThe core file used is built for i386 so weneed the x86 backend to be able to load it.Reviewed By: labathDifferential Revision: https://reviews.llvm.
[lldb] Require x86 for unwind no-return testThe core file used is built for i386 so weneed the x86 backend to be able to load it.Reviewed By: labathDifferential Revision: https://reviews.llvm.org/D100195
[lldb] [test] Update test status for NetBSD
[lldb/test] Use shorter test case names in TestStandardUnwindTestStandardUnwind uses the full absolute path to a set of C/C++ files as the test case name, which in turn is used in the name of a log
[lldb/test] Use shorter test case names in TestStandardUnwindTestStandardUnwind uses the full absolute path to a set of C/C++ files as the test case name, which in turn is used in the name of a log file. When the source file is long, and the directory where log files are stored is also long, this causes an OSError because the log filename is too long.Reviewed By: JDevlieghereDifferential Revision: https://reviews.llvm.org/D86752
[test] XFail TestSigtrampUnwind based on arch rather than OS
[lldb] Copy m_behaves_like_zeroth_frame on stack frame updateFix to code from https://reviews.llvm.org/D64993.Field StackFrame::m_behaves_like_zeroth_frame was introduced in commit[1], however t
[lldb] Copy m_behaves_like_zeroth_frame on stack frame updateFix to code from https://reviews.llvm.org/D64993.Field StackFrame::m_behaves_like_zeroth_frame was introduced in commit[1], however that commit hasn't added a copying of the field toUpdatePreviousFrameFromCurrentFrame, therefore the value wouldn't changewhen updating frames to reflect the current situation.The particular scenario, where this matters is following. Assume we havefunction main that invokes function func1. We set breakpoint atfunc1 entry and in main after the func1 call, and do not stop atthe main entry. Therefore, when debugger stops for the first time,func1 is frame#0, while main is frame#1, thusm_behaves_like_zeroth_frame is set to 0 for main frame. Execution isresumed, and stops now in main, where it is now frame#0. However whileupdating the frame object, m_behaves_like_zeroth_frame remains false.This field plays an important role when calculating line information forbacktrace: for frame#0, PC is the current line, therefore lineinformation is retrieved for PC, however for all other frames this isnot the case - calculated PC is a return-PC, i.e. instruction after thefunction call line, therefore for those frames LLDB needs to step backby one instruction. Initial implementation did this strictly for framesthat have index != 0 (and index is updated properly inUpdatePreviousFrameFromCurrentFrame), but m_behaves_like_zeroth_frameadded a capability for middle-of-stack frames to behave in a similarmanner. But because current code now doesn't check frame idx,m_behaves_like_zeroth_frame must be set to true for frames with 0 index,not only for frame that behave like one. In the described test case,after stopping in main, LLDB would still consider frame#0 asnon-zeroth, and would subtract instruction from the PC, and would reportprevious like as current line.The error doesn't manifest itself in LLDB interpreter though - it can bereproduced through LLDB-MI and when using SB API, but not when weinterpreter command "continue" is executed. Honestly, I didn't fullyunderstand why it works in interpreter, I did found that bug "fixes"itself if I enable DEBUG_STACK_FRAMES in StackFrameList.cpp, becausethat calls StackFrame::Dump and that callsGetSymbolContext(eSymbolContextEverything), which fills the context offrame on the first breakpoint, therefore it doesn't have to berecalculated (improperly) on a second frame. However, on firstbreakpoint symbol context is calculated for the "call" line, not thenext one, therefore it should be recalculated anyway on a secondbreakpoint, and it is done correctly, even thoughm_behaves_like_zeroth_frame is still incorrect, as long asGetSymbolContext(eSymbolContextEverything) has been called.[1] 31e6dbe1c6a6 Fix PC adjustment in StackFrame::GetSymbolContextDifferential Revision: https://reviews.llvm.org/D75975Patch by Anton Kolesov <[email protected]>
[lldb][testsuite] Create a SBDebugger instance for each testSome tests set settings and don't clean them up, this leads to side effects in other tests.The patch removes a global debugger instance
[lldb][testsuite] Create a SBDebugger instance for each testSome tests set settings and don't clean them up, this leads to side effects in other tests.The patch removes a global debugger instance with a per-test debugger to avoid such effects.From what I see, lldb.DBG was needed to determine the platform before a test is run,lldb.selected_platform is used for this purpose now. Though, this required adding a new functionto the SBPlatform interface.Differential Revision: https://reviews.llvm.org/D74903
[lldb] Remove license headers from all test source filesSummary:Around a third of our test sources have LLVM license headers. This patch removes those headers from all testsources and also fixes
[lldb] Remove license headers from all test source filesSummary:Around a third of our test sources have LLVM license headers. This patch removes those headers from all testsources 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.pyReviewers: #lldb, espindola, JDevlieghereReviewed By: #lldb, JDevlieghereSubscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D74839
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor 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; donefor 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; donefor 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, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151