summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/Process
AgeCommit message (Collapse)Author
2025-09-04[lldb] Mark UnsupportedLanguage.test Unsupported on WindowsAiden Grossman
This is to fix buildbot fallout post #156729 without needing to revert the original patch.
2025-09-03[LLDB] Make internal shell the default for running LLDB lit tests. (#156729)cmtice
This patch updates the lld lit test config to use the internal shell by default. This has some performance advantages (~10-15%) and also produces nicer failure output. It also updates the two LLDB tests to not require shell (so that they run under the internal shell), after first verifying that they run and pass using the internal shell; and it fixes one test that was not passing under the internal shell.
2025-05-30[LLDB] Avoid crashes when inspecting MSVC STL types (#140761)nerix
When inspecting/printing types from MSVC's STL, LLDB would crash because it assumes these types were from libstdc++. Specifically, `std::shared_ptr` and `std::optional` would crash because of a null pointer dereference. I added a minimal test that tests the types with C++ helpers for libstdc++ (only tests for crashes). - Fixes #115216 - Fixes #120310 This still has one unresolved discussion: What about MS STL types? This is https://github.com/llvm/llvm-project/issues/24834, but there was a bit of discussion in #120310 as well. The main issue is that MSVC's STL uses the same type names as libstdc++ (i.e. neither uses an inline namespace like libc++ for some types).
2024-11-12[lldb][test] Fix remote Shell tests failures on Windows host (#115716)Vladislav Dzhidzhoev
Since the remote Shell test execution feature was added, these tests should now be disabled on Windows target instead of Windows host. It should fix failures on https://lab.llvm.org/staging/#/builders/197/builds/76.
2024-10-31[lldb] Remove lldb-repro utilityJonas Devlieghere
Remove lldb-repro which was used to run the test suite against a reproducer. The corresponding functionality has been removed from LLDB so there's no need for the tool anymore.
2024-08-30[lldb][AArch64] Do not crash if NT_ARM_TLS is missing (#106478)Igor Kudrin
[D156118](https://reviews.llvm.org/D156118) states that this note is always present, but it is better to check it explicitly, as otherwise `lldb` may crash when trying to read registers.
2024-08-22[lldb] Pick the correct architecutre when target and core file disagree ↵Jonas Devlieghere
(#105576) In f9f3316, Adrian fixed an issue where LLDB wouldn't update the target's architecture when the process reported a different triple that only differed in its sub-architecture. This unintentionally regressed core file debugging when the core file reports the base architecture (e.g. armv7) while the main binary knows the correct CPU subtype (e.g. armv7em). After the aforementioned change, we update the target architecture from armv7em to armv7. Fix the issue by trusting the target architecture over the ProcessMachCore process. rdar://133834304
2024-06-18[lldb] Suppress unsupported language warning for assembly (#95871)Jonas Devlieghere
The following warning is technically correct, but pretty much useless, since there aren't any frame variables that we'd expect the debugger to understand. > This version of LLDB has no plugin for the language "assembler". > Inspection of frame variables will be limited. This message is useful in the general case but should be suppressed for the "assembler" case. rdar://92745462
2022-04-14[lldb] Remove TestShell.testJonas Devlieghere
Remove TestShell.test because it's failing on the bot with "this is a non-interactive debug session, cannot get permission to debug processes." The only thing that's special about this test is the shell we're launching with. I need to do a bit of digging to understand why that's causing this error. rdar://91766931
2022-04-14[lldb] Port Process::PrintWarning* to use the new diagnostic eventsJonas Devlieghere
Port the two Process::PrintWarning functions to use the new diagnostic events through Debugger::ReportWarning. I kept the wrapper function in the process, but delegated the work to the Module. Consistent with the current code, the Module ensures the warning is only printed once per module. Differential revision: https://reviews.llvm.org/D123698
2022-04-13[lldb] Expand $ when using tcshJonas Devlieghere
Unlike for any of the other shells, we were escaping $ when using tcsh. There's nothing special about $ in tcsh and this prevents you from expanding shell variables, one of the main reasons this functionality exists in the first place. Differential revision: https://reviews.llvm.org/D123690
2021-12-04Windows: support `DoLoadImage`Saleem Abdulrasool
This implements `DoLoadImage` and `UnloadImage` in the Windows platform plugin modelled after the POSIX platform plugin. This was previously unimplemented and resulted in a difficult to decipher error without any logging. This implementation is intended to support enables the use of LLDB's Swift REPL on Windows. Paths which are added to the library search path are persistent and applied to all subsequent loads. This can be adjusted in the future by storing all the cookies and restoring the path prior to returning from the helper. However, the dynamic path count makes this a bit more challenging. Reviewed By: @JDevlieghere Differential Revision: https://reviews.llvm.org/D77287
2021-11-28test: add a lit configuration for Windows subdirectorySaleem Abdulrasool
This adds a local configuration to the Windows subdirectory to filter out the tests on non-Windows platforms using the lit filtering.
2021-05-12Rename human-readable name for DW_LANG_Mips_AssemblerAdrian Prantl
The Mips in DW_LANG_Mips_Assembler is a vendor name not an architecture name and in lack of a proper generic DW_LANG_assembler, some assemblers emit DWARF using this tag. Due to a warning I recently introduced users will now be greeted with This version of LLDB has no plugin for the mipsassem language. Inspection of frame variables will be limited. By renaming this to just "Assembler" this error message will make more sense. Differential Revision: https://reviews.llvm.org/D101406 rdar://77214764
2020-11-12[lldb] Replace TestAbortExitCode with a debugserver specific testRaphael Isemann
When I added TestAbortExitCode I actually planned this to be a generic test for the exit code functionality on POSIX systems. However due to all the different test setups we can have I don't think this worked out. Right now the test had to be made so permissive that it pretty much can't fail. Just to summarize, we would need to support the following situations: 1. ToT debugserver (on macOS) 2. lldb-server (on other platforms) 3. Any old debugserver version when using the system debugserver (on macOS) This patch is removing TestAbortExitCode and adds a ToT debugserver specific test that checks the patch that motivated the whole exit code testing. There is already an exit-code test for lldb-server from what I can see and 3) is pretty much untestable as we don't know anything about the system debugserver. Reviewed By: kastiglione Differential Revision: https://reviews.llvm.org/D89305
2020-10-12[lldb] Handle alternative output in TestAbortExitCodeDave Lee
This test On macOS, this test can instead return `status = 0 (0x00000000) Terminated due to signal 6`. This updates the `CHECK` accordingly. Differential Revision: https://reviews.llvm.org/D89273
2020-09-03[lldb] Remove debugserver specific string from TestAbortExitCode checkRaphael Isemann
The test only checks the exit code that the debug server sends back, but not the following explanation which is different for debugserver and lldb-server.
2020-09-03[debugserver] Fix that debugserver's stop reply packets always return signal ↵Raphael Isemann
code 0 If our process terminates due to an unhandled signal, we are supposed to get the signal code via WTERMSIG. However, we instead try to get the exit status via WEXITSTATUS which just ends up always calculating signal code 0 (at least on the macOS implementation where it just shifts the signal code bits away and we're left with only 0 bits). The exit status calculation on the LLDB side also seems a bit off as it claims an exit status that is just the signal code (instead of for example 128 + signal code), but that will be another patch. Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D86336
2020-08-20[test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input ↵Fangrui Song
redirection
2020-05-22Restrict test for DW_AT_APPLE_optimized to DarwinAdrian Prantl
2020-05-22Print a warning when stopped in a frame LLDB has no plugin for.Adrian Prantl
This patchs adds an optional warning that is printed when stopped at a frame that was compiled in a source language that LLDB has no plugin for. The motivational use-case is debugging Swift code on Linux. When the user accidentally invokes the system LLDB that was built without the Swift plugin, it is very much non-obvious why debugging doesnt work. This warning makes it easy to figure out what went wrong. <rdar://problem/56986569>
2020-02-14Remove 'process launch failed:' message prefix in Target::LaunchJason Molenda
SB API clients can describe the failure message in a more natural way for their UI, this doesn't add information for them. Differential Revision: https://reviews.llvm.org/D74585 <rdar://problem/49953304>
2020-01-22[lldb/Test] Use lit's capabilities to skip lldb-repro tests.Jonas Devlieghere
This allows us to skip the reproducer tests themselves as a whole as well as individual tests with the UNSUPPORTED keyword.
2019-10-31[lldb/lit] Introduce %clang_host substitutionsPavel Labath
Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619
2019-10-31[LLDB] [Windows] Fix Windows-specific race condition in LLDB for session ↵Martin Storsjö
lifetime This can e.g. happen if the debugged executable exits before the initial stop, e.g. if it fails to load dependent DLLs. Add a virtual destructor to ProcessDebugger and let it clean up the session, and make ProcessWindows::OnExitProcess call ProcessDebugger::OnExitProcess for shared parts. Fix suggestion by Adrian McCarthy. Differential Revision: https://reviews.llvm.org/D69503
2019-10-09Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere
The original patch got reverted because it broke `check-lldb` on a clean build. This fixes that. llvm-svn: 374201
2019-10-09Revert [test] Split LLDB tests into API, Shell & UnitAdrian Prantl
as it appears to have broken check-lldb. This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82) llvm-svn: 374187
2019-10-09[test] Split LLDB tests into API, Shell & UnitJonas Devlieghere
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184