[Lldb-commits] [lldb] aca4488 - [lldb] Surpress "ingoring result" warning in reproducer_handler
Author: Pavel Labath Date: 2020-12-27T13:58:05+01:00 New Revision: aca4488847b4ddceeda8d4ddb2cd9cb3defbab0c URL: https://github.com/llvm/llvm-project/commit/aca4488847b4ddceeda8d4ddb2cd9cb3defbab0c DIFF: https://github.com/llvm/llvm-project/commit/aca4488847b4ddceeda8d4ddb2cd9cb3defbab0c.diff LOG: [lldb] Surpress "ingoring result" warning in reproducer_handler Added: Modified: lldb/tools/driver/Driver.cpp Removed: diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 870f763436a4..e4a60127b65e 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -732,7 +732,8 @@ void sigcont_handler(int signo) { void reproducer_handler(void *finalize_cmd) { if (SBReproducer::Generate()) { -std::system(static_cast(finalize_cmd)); +int result = std::system(static_cast(finalize_cmd)); +(void)result; fflush(stdout); } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] bd39a5c - [lldb/test] Automatically skip remote lldb-server tests when applicable
Author: Pavel Labath Date: 2020-12-27T13:58:10+01:00 New Revision: bd39a5cb30a34547eb56a81eb7ca8aca23544099 URL: https://github.com/llvm/llvm-project/commit/bd39a5cb30a34547eb56a81eb7ca8aca23544099 DIFF: https://github.com/llvm/llvm-project/commit/bd39a5cb30a34547eb56a81eb7ca8aca23544099.diff LOG: [lldb/test] Automatically skip remote lldb-server tests when applicable The tests don't work with remote debugservers. This isn't a problem with any particular test, but the test infrastructure itself, which is why each of these tests has a @skipIfDarwinEmbedded decorator. This patch replaces that with a central category-based solution. It also moves the ad-hoc windows skipping mechanism there too. Added: Modified: lldb/packages/Python/lldbsuite/test/dotest.py lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py lldb/test/API/tools/lldb-server/TestGdbRemoteCompletion.py lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py lldb/test/API/tools/lldb-server/TestLldbGdbServer.py lldb/test/API/tools/lldb-server/commandline/TestGdbRemoteConnection.py lldb/test/API/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py lldb/test/API/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py Removed: diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 86ea34ee2582..c728bf329202 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -852,11 +852,20 @@ def checkDebugInfoSupport(): def checkDebugServerSupport(): from lldbsuite.test import lldbplatformutil +import lldb +skip_msg = "Skipping %s tests, as they are not compatible with remote testing on this platform" if lldbplatformutil.platformIsDarwin(): configuration.skip_categories.append("llgs") +if lldb.remote_platform: +# +configuration.skip_categories.append("debugserver") +print(skip_msg%"debugserver"); else: configuration.skip_categories.append("debugserver") +if lldb.remote_platform and lldbplatformutil.getPlatform() == "windows": +configuration.skip_categories.append("llgs") +print(skip_msg%"lldb-server"); def run_suite(): # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index d9289251d89d..71e75adbecb7 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -199,9 +199,7 @@ def _init_llgs_test(self): # Reverse connections may be tricky due to firewalls/NATs. reverse_connect = False -triple = self.dbg.GetSelectedPlatform().GetTriple() -if re.match(".*-.*-windows", triple): -self.skipTest("Remotely testing is not supported on Windows yet.") +# FIXME: This is extremely linux-oriented # Grab the ppid from /proc/[shell pid]/stat err, retcode, shell_stat = self.run_platform_command( diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py index 84d44b5e0b84..9ffa7e26fab7 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py @@ -11,7 +11,6 @@ class TestGdbRemoteAttach(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) -@skipIfDarwinEmbedded # lldb-server tests not updated to work on ios etc yet def attach_with_vAttach(self): # Start the inferior, start the debug monitor, nothing is attached yet. procs = self.prep_debug_monitor_and_inferior( diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py index f9c8fadc15b9..9d9c4d89e0b5 100644
[Lldb-commits] [PATCH] D93481: [lldb/Lua] add support for multiline scripted breakpoints
labath added inline comments. Comment at: lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h:39 llvm::Error LoadModule(llvm::StringRef filename); + llvm::Error LoadBuffer(llvm::StringRef buffer, bool pop_result = true); llvm::Error ChangeIO(FILE *out, FILE *err); tammela wrote: > labath wrote: > > This default value does not seem particularly useful. In fact, I am not > > sure if this argument should even exist at all. The usage in > > `IOHandlerIsInputComplete` is sufficiently unorthodox that it might be a > > good idea to draw attention to the fact that something funky is happening > > via an explicit pop (and maybe a comment). > We can't explicitly pop, as in calling `lua_pop()`, from > `ScriptInterpreterLua.cpp` because the `lua_State` is not exposed. Are you > suggesting to add a method that wraps `lua_pop()` as well? Good question. I didn't realize this aspect of the problem. I think the answer to this depends on the direction we want the Lua class to go in. Back when it was first introduced, my idea was for it to be some sort of a c++ wrapper for the lua (C) api. It would offset a nicer interface to interact with lua, but would otherwise be (more-or-less) lldb-agnostic (kind of like our PythonDataObjects). In that world, it would make sense to expose the lua stack and the pop function (among other things). However, I don't think that's really how things have worked out. The current Lua interface is much more high-level and much-more debugger-oriented than I originally imagined. Among functions like `RegisterBreakpointCallback` and `ChangeIO`, a function like `Pop` seems misplaced. I'm not sure this is a good position to be in (there's still a need to find a home for the c++ wrapper-like functions, for example to handle exceptions), but if we want to go down that path, then a pop function is not the right answer. However, I think the same applies to the LoadBuffer function, as it cannot be useful (beyond this syntax-check use case) without exposing the lua stack, implicitly or explicitly. In this world it would be better to make the function even more high-level, and have something like `CheckSyntax(buffer)` (which does pretty much what LoadBuffer does, but it always pops the result). Internally it can be implemented as a call to LoadBuffer, but this function would now be a private implementation detail instead of a part of the interface. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93481/new/ https://reviews.llvm.org/D93481 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D93495: CrashReason: Add MTE tag check faults to the list of crash reasons.
emaste added inline comments. Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:62 +#ifndef SEGV_MTEAERR +#define SEGV_MTEAERR 8 +#endif This should perhaps include an `#ifdef LINUX`(sp?) somehow, since 8 and 9 are not necessarily MTEAERR / MTESERR on all POSIXy systems (although that said I'm planning to reserve 8 and 9 on FreeBSD to match). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93495/new/ https://reviews.llvm.org/D93495 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D93495: CrashReason: Add MTE tag check faults to the list of crash reasons.
emaste added inline comments. Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:62 +#ifndef SEGV_MTEAERR +#define SEGV_MTEAERR 8 +#endif emaste wrote: > This should perhaps include an `#ifdef LINUX`(sp?) somehow, since 8 and 9 are > not necessarily MTEAERR / MTESERR on all POSIXy systems (although that said > I'm planning to reserve 8 and 9 on FreeBSD to match). (https://reviews.freebsd.org/D27785) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93495/new/ https://reviews.llvm.org/D93495 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits