[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] Allow to register frame recognizers applied beyond the first instructionIt is currently possible to register a frame recognizer, but it will be applied if and only if the frame's PC points t
[lldb] Allow to register frame recognizers applied beyond the first instructionIt is currently possible to register a frame recognizer, but it will be applied if and only if the frame's PC points to the very first instruction of the specified function, which limits usability of this feature.The implementation already supports changing this behaviour by passing an additional flag, but it's not possible to set it via the command interface. Fix that.Reviewed By: jinghamDifferential Revision: https://reviews.llvm.org/D108510
[lldb] Replace unneeded use of Foundation with ObjectiveC in tests (NFC)When referencing `NSObject`, it's enough to import `objc/NSObject.h`. Importing `Foundation` is unnecessary in these cases.
[lldb] Replace unneeded use of Foundation with ObjectiveC in tests (NFC)When referencing `NSObject`, it's enough to import `objc/NSObject.h`. Importing `Foundation` is unnecessary in these cases.Differential Revision: https://reviews.llvm.org/D99867
[lldb] [test] Rename '.categories' to 'categories'Make category-specifying files visible. There is really no good reasonto keep them hidden, and having them visible increases the chancesthat som
[lldb] [test] Rename '.categories' to 'categories'Make category-specifying files visible. There is really no good reasonto keep them hidden, and having them visible increases the chancesthat someone will actually spot them.Differential Revision: https://reviews.llvm.org/D91065
[lldb] [test] Skip ObjC-based tests via 'objc' categoryReplace the plethora of ObjC-implied 'skipUnlessDarwin' decoratorswith marking tests as 'objc' category (whenever missing), and skip allObjC
[lldb] [test] Skip ObjC-based tests via 'objc' categoryReplace the plethora of ObjC-implied 'skipUnlessDarwin' decoratorswith marking tests as 'objc' category (whenever missing), and skip allObjC tests on non-Darwin platforms. I have used '.categories' filewherever it was present already or all (>1) tests were relying on ObjC,and explicit add_test_categories() where there was only one test.Differential Revision: https://reviews.llvm.org/D91056
[lldb] Make deleting frame recognizers actually workSummary:Frame recognizers are stored alongside a flag that indicates whether they weredeleted by the user. If the flag is set, they are suppos
[lldb] Make deleting frame recognizers actually workSummary:Frame recognizers are stored alongside a flag that indicates whether they weredeleted by the user. If the flag is set, they are supposed to be ignored by therest of the frame recognizer code. 'frame recognizer delete' is supposed to setthat flag. 'frame recognizer clear' however actually deletes all framerecognizers (so, it doesn't set the flag but directly deletes them from thelist).The current implementation of this concept is pretty broken. `frame recognizerdelete` sets the flag, but it somehow thinks that the recognizer id is an indexin the recognizer list. That's not true as it's actually just a member of eachrecognizer entry. So it actually just sets the `deleted` flag for a random otherrecognizer. The tests for the recognizer still pass as `frame recognizer list`is also broken and just completely ignored the `deleted` flag and lists allrecognizers. Also `frame recognizer delete` just ignores if it can't actuallydelete a recognizer if the id is invalid.I think we can simplify this whole thing by just actually deleting recognizersinstead of making sure all code is actually respecting the `deleted` flag. Iassume the intention of this was to make sure that all recognizers are gettingunique ids over the course of an LLDB session, but as `clear` is actuallydeleting them and we keep recycling ids, that didn't really work to begin with.This patch deletes the `deleted` flag and just actually deletes the storedrecognizer. Also adds the missing error message in case it find a recognizerwith a given id.Reviewers: mibReviewed By: mibSubscribers: abidh, JDevlieghereDifferential Revision: https://reviews.llvm.org/D84404
[lldb] Store StackFrameRecognizers in the target instead of a global listSummary:Currently the frame recognizers are stored in a global list (the list in theStackFrameRecognizersManagerImpl sing
[lldb] Store StackFrameRecognizers in the target instead of a global listSummary:Currently the frame recognizers are stored in a global list (the list in theStackFrameRecognizersManagerImpl singleton to be precise). All commands andplugins that modify the list are just modifying that global list of recognizerswhich is shared by all Target and Debugger instances.This is clearly against the idea of LLDB being usable as a library and it alsoleads to some very obscure errors as now multiple tests are sharing the usedframe recognizers. For example D83400 is currently failing as it reorders sometest_ functions which permanently changes the frame recognizers of alldebuggers/targets. As all frame recognizers are also initialized in a 'once'guard, it's also impossible to every restore back the original frame recognizersonce they are deleted in a process.This patch just moves the frame recognizers into the current target. This seemsthe way everyone assumes the system works as for example the assert framerecognizers is using the current target to find the function/so-name to look for(which only works if the recognizers are stored in the target).Reviewers: jingham, mibReviewed By: jingham, mibSubscribers: MrHate, JDevlieghereDifferential Revision: https://reviews.llvm.org/D83757
[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in CommandObjectsSummary:This replaces the current use of LLDB's own `StringConvert` with LLVM's`to_integer` which
[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in CommandObjectsSummary:This replaces the current use of LLDB's own `StringConvert` with LLVM's`to_integer` which has a less error-prone API and doesn't use special 'errorvalues' to designate parsing problems.Where needed I also added missing error handling code that prints a parsingerror instead of continuing with the error value returned from `StringConvert`(which either gave a cryptic error message or just took the error valueperformed an incorrect action with it. For example, `frame recognizer delete -1`just deleted the frame recognizer at index 0).Reviewers: #lldb, labathReviewed By: labathSubscribers: labath, abidh, JDevlieghereDifferential Revision: https://reviews.llvm.org/D82297
[lldb/Target] Support more than 2 symbols in StackFrameRecognizerThis patch changes the way the StackFrame Recognizers match a certainframe.Until now, recognizers could be registered with a func
[lldb/Target] Support more than 2 symbols in StackFrameRecognizerThis patch changes the way the StackFrame Recognizers match a certainframe.Until now, recognizers could be registered with a functionname but also an alternate symbol.This change is motivated by a test failure for the Assert framerecognizer on Linux. Depending the version of the libc, the abortfunction (triggered by an assertion), could have more than twosignatures (i.e. `raise`, `__GI_raise` and `gsignal`).Instead of only checking the default symbol name and the alternate one,lldb will iterate over a list of symbols to match against.rdar://60386577Differential Revision: https://reviews.llvm.org/D76188Signed-off-by: Med Ismail Bennani <[email protected]>
[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