[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] Introduce createTestTarget for creating a valid target in API testsAt the moment nearly every test calls something similar to`self.dbg.CreateTarget(self.getBuildArtifact("a.out"))` and them
[lldb] Introduce createTestTarget for creating a valid target in API testsAt the moment nearly every test calls something similar to`self.dbg.CreateTarget(self.getBuildArtifact("a.out"))` and them sometimeschecks if the created target is actually valid with something like`self.assertTrue(target.IsValid(), "some useless text")`.Beside being really verbose the error messages generated by this pattern arealways just indicating that the target failed to be created but now why.This patch introduces a helper function `createTestTarget` to our Test classthat creates the target with the much more verbose `CreateTarget` overload thatgives us back an SBError (with a fancy error). If the target couldn't be createdthe function prints out the SBError that LLDB returned and asserts for us. Italso defaults to the "a.out" build artifact path that nearly all tests are usingto avoid to hardcode "a.out" in every test.I converted a bunch of tests to the new function but I'll do the rest of thetest suite as follow ups.Reviewed By: JDevlieghereDifferential Revision: https://reviews.llvm.org/D102771
[lldb] Allow limiting the number of error diagnostics when parsing an expressionWhile debugging another bug I found out that we currently don't set any limitfor the number of diagnostics Clang emi
[lldb] Allow limiting the number of error diagnostics when parsing an expressionWhile debugging another bug I found out that we currently don't set any limitfor the number of diagnostics Clang emits. If a user does something thatgenerates a lot of errors (like including some long header file from within theexpression function), then we currently spam the LLDB output with potentiallythousands of Clang error diagnostics.Clang sets a default limit of 20 errors, but given that LLDB is often usedinteractively for small expressions I would say a limit of 5 is enough. Thelimit is implemented as a setting, so if a user cares about seeing having amillion errors printed to their terminal then they can just increase thesettings value.Reviewed By: shafik, mibDifferential Revision: https://reviews.llvm.org/D88889