7334 Commits

Author SHA1 Message Date
Miro Bucko
493eefc93f
[lldb][test] Fix failing test TestAddressRange.py (#93871)
Test llvm-project/lldb/test/API/python_api/address_range/TestAddressRange.py is failing on Windows due adding a carriage return character at the end of line. Original PR is #93836.
2024-05-30 13:44:51 -07:00
Miro Bucko
48175a5d9f
[lldb] Add SBAddressRange and SBAddressRangeList to SB API (#93836)
This adds new SB API calls and classes to allow a user of the SB API to obtain an address range from SBFunction and SBBlock. This is a second attempt to land the reverted PR #92014.
2024-05-30 10:38:21 -07:00
Dmitry Vasilyev
b62ba7f5b1
[lldb] Fixed the TestGdbRemotePlatformFile test running on a remote target (#93832)
Skip checking of few stat fields like st_dev (ID of device containing
file) in case of a remote target.
2024-05-30 19:57:16 +04:00
Dmitry Vasilyev
59e2a6b08f
[lldb] Fixed the TestDebuggerAPI test running on a remote target (#93829)
Recently we have disabled this test for Windows host and Linux target.
Now we faced the same issue #92419 in case of Linux x86_64 host and
Linux Aarch64 target.
2024-05-30 19:56:46 +04:00
Dmitry Vasilyev
facb767e5b
[lldb] Fixed the TestGdbRemoteLibrariesSvr4Support test running on a remote target (#93825)
The TestGdbRemoteLibrariesSvr4Support test failed in case of Linux
x86_64 host and Linux Aarch64 target. Installing libraries to the remote
target is not enough. This test actively uses self.getBuildDir() and
os.path.realpath() which does not work in case of the remote target. So,
disable this test for remote target now.
2024-05-30 19:56:04 +04:00
Pavel Labath
a2bcb932f3 [lldb] Attempt to fix TestCompletion on macos
Macos will automatically load dependent modules when creating a target,
resulting in more modules than the test expects.
2024-05-30 15:28:13 +00:00
Michael Buch
8b600a3732 Revert "Add SBAddressRange and SBAddressRangeList to SB API (#92014)"
This reverts commit 42944e4600827738fae868f0df831fb2678be8b4.
2024-05-30 12:40:05 +01:00
Pavel Labath
540a36ad7e
[lldb/DWARF] Follow DW_AT_signature when computing type contexts (#93675)
This is necessary to correctly resolve the context within types, as the
name of the type is only present in the type unit.
2024-05-30 09:57:51 +02:00
Pavel Labath
d554f2379b
[lldb] Fix module name tab completion (#93458)
Module names can be matched either by a full path or just their
basename. The completion machinery tried to do both, but had several
bugs:
- it always inserted the basename as a completion candidate, even if the
string being completed was a full path
- due to FileSpec canonicalization, it lost information about trailing
slashes (it treated "lib/<TAB>" as "lib<TAB>", even though it's clear
the former was trying to complete a directory name)
- due to both of the previous issues, the completion candidates could
end up being shorter than the string being completed, which caused
crashes (string out of range errors) when attempting to substitute the
results.

This patch rewrites to logic to remove these kinds of issues:
- basename and full path completion are handled separately
- full path completion is attempted always, basename only if the input
string does not contain a slash
- the code remembers both the canonical and original spelling or the
completed argument. The canonical arg is used for matching, while the
original spelling is used for completion. This way "/foo///.//b<TAB>"
can still match "/foo/bar", but it will complete to "/foo///.//bar".
2024-05-30 09:57:13 +02:00
Pavel Labath
f38ebec710
[lldb-dap] Don't call GetNumChildren on non-indexed synthetic variables (#93534)
A synthetic child provider might need to do considerable amount of work
to compute the number of children. lldb-dap is currently calling that
for all synthethic variables, but it's only actually using the value for
values which it deems to be "indexed" (which is determined by looking at
the name of the first child). This patch reverses the logic so that
GetNumChildren is only called for variables with a suitable first child.
2024-05-30 09:54:13 +02:00
Pavel Labath
c7acca1cb0 [lldb] Fix collisions between two breakpad tests
symtab-sorted-by-size.test was using the same output file name as
symtab.test.
2024-05-30 07:16:22 +00:00
David Spickett
23a09b9931 [lldb][Test] Remove some xfails for AArch64 Linux
PR #92245 fixed these tests on Linux. They likely work on FreeBSD too
but leaving the xfail for that so it can be confirmed later.

Also updated a bugzilla link to one that redirects to Github issues.

Relates to issues #43398 and #48751.
2024-05-29 10:28:10 +00:00
David Spickett
971f1aaad3 [lldb][Test][Windows] Fix flaky address range API tests
The new tests added in #92014 have been flaky on Linaro's
Windows on Arm bot. They appear to be hitting a deadlock trying
to clean up the test process.

This only happens in async mode and I don't see why this test
case needs async mode, so the simple workaround is to stick to
sync mode.
2024-05-29 10:07:47 +00:00
Miro Bucko
42944e4600
Add SBAddressRange and SBAddressRangeList to SB API (#92014)
This adds new SB API calls and classes to allow a user of the SB API to obtain an address ranges from SBFunction and SBBlock.
2024-05-28 09:29:10 -07:00
Zequan Wu
51dd4eaaa2
Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (#92328)
This reapplies
9a7262c260
(#90663) and added https://github.com/llvm/llvm-project/pull/91808 as a
fix.

It was causing tests on macos to fail because
`SymbolFileDWARF::GetForwardDeclCompilerTypeToDIE` returned the map
owned by this symol file. When there were two symbol files, two
different maps were created for caching from compiler type to DIE even
if they are for the same module. The solution is to do the same as
`SymbolFileDWARF::GetUniqueDWARFASTTypeMap`: inquery
SymbolFileDWARFDebugMap first to get the shared underlying SymbolFile so
the map is shared among multiple SymbolFileDWARF.
2024-05-28 11:49:07 -04:00
Michael Kruse
c3efb57655
[lldb] Revise IDE folder structure (#89748)
Update the folder titles for targets in the monorepository that have not
seen taken care of for some time. These are the folders that targets are
organized in Visual Studio and XCode
(`set_property(TARGET <target> PROPERTY FOLDER "<title>")`)
when using the respective CMake's IDE generator.

 * Ensure that every target is in a folder
 * Use a folder hierarchy with each LLVM subproject as a top-level folder
 * Use consistent folder names between subprojects
 * When using target-creating functions from AddLLVM.cmake, automatically
deduce the folder. This reduces the number of
`set_property`/`set_target_property`, but are still necessary when
`add_custom_target`, `add_executable`, `add_library`, etc. are used. A
LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's
root CMakeLists.txt.
2024-05-25 17:29:18 +02:00
Dmitry Vasilyev
77369a7f1a
[lldb] Fixed the TestDebuggerAPI test on x86_64 Windows host (#90580)
Disable the TestDebuggerAPI test in case of the remote target and
Windows host.
2024-05-24 23:19:51 +04:00
Pavel Labath
fa6377119c
[lldb-dap] Automatically skip lldb-dap tests for remote platforms (#93169)
The don't currently work (and they're also not particularly useful,
since all of the remote stuff happens inside lldb).

This saves us from annotating tests one by one.
2024-05-24 08:52:32 +02:00
David Spickett
32c3561d44 [lldb][Test] Escape | chars in enum tests
| is a reserved character in regex.
2024-05-23 12:28:26 +00:00
Dmitry Vasilyev
e37da2cef7
[lldb] Fixed the TestExitDuringExpression test in case of a remote target (#93119)
Sometimes this test failed on the assert `The thread exited` in case of
a remote target. Increase the timeout to 1 second to avoid a racing
condition.
2024-05-23 14:01:10 +04:00
Dmitry Vasilyev
4d9e7b14e4
[lldb][Windows] Fixed the TestBreakpointCommand test (#93122)
The TestBreakpointCommand test is incorrectly disabled for Windows
target. We can disable it for Windows host instead or just fix the
issue. This patch fixes the path separator in
BreakpointResolverFileLine::DeduceSourceMapping() and the Windows
specific absolute path in the test in case of the Windows host.
2024-05-23 13:59:02 +04:00
Pavel Labath
a2824632cb
[lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (#93006)
We currently cannot represent abbreviation codes with more than 16 bits,
and we were lldb-asserting if we ever ran into one. While I haven't seen
any real DWARF with these kinds of abbreviations, it is possible to hit
this with handcrafted evil dwarf, due some sort of corruptions, or just
bugs (the addition of PeekDIEName makes these bugs more likely, as the
function blindly dereferences offsets within the debug info section) .

Missing abbreviations were already reporting an error. This patch turns
sure that large abbreviations into an error as well, and adds a test for
both cases.
2024-05-23 11:23:07 +02:00
Med Ismail Bennani
ae3f68066c
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392)" (#93153)
Reverts llvm/llvm-project#93149 since it breaks
https://lab.llvm.org/buildbot/#/builders/68/builds/74799
2024-05-23 01:46:29 -07:00
Med Ismail Bennani
4cc6d0f4df
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392) (#93149)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introducing 2
ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.

This allows us to get rid of every ScriptedThreadPlan-specific SWIG
method and re-use the same affordances as other scripting offordances,
like Scripted{Process,Thread,Platform} & OperatingSystem.

To do so, this adds new transformer methods for `ThreadPlan`, `Stream` &
`Event`, to allow the bijection between C++ objects and their python
counterparts.

This just re-lands #70392 after fixing test failures.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-05-23 01:25:48 -07:00
Daniel Thornburgh
c93a67038d
Revert "[lldb] Added Debuginfod tests and fixed a couple issues" (#93094)
Reverts llvm/llvm-project#92572 due to Fuchsia CI breakages (using CLI
tools in tests that weren't necessarily built).
2024-05-22 13:56:33 -07:00
Kevin Frei
e558d21e87
[lldb] Added Debuginfod tests and fixed a couple issues (#92572)
Here we go with attempt number five. Again, no changes to the LLDB code
diff, which has been reviewed several times.

For the tests, I added a `@skipIfCurlSupportMissing` annotation so that
the Debuginfod mocked server stuff won't run, and I also disabled
non-Linux/FreeBSD hosts altogether, as they fail for platform reasons on
macOS and Windows. In addition, I updated the process for extracting the
GNU BuildID to no create a target, per some feedback on the previous
diff.

For reference, previous PR's (landed, backed out after the fact for
various reasons) #90622, #87676, #86812, #85693

---------

Co-authored-by: Kevin Frei <freik@meta.com>
2024-05-22 10:31:04 -07:00
Pavel Labath
9677e8171c
[lldb/dwarf] Fix DW_IDX_parent processing for split dwarf (#92745)
DWARFDebugInfo only knows how to resolve references in its own file, but
in split dwarf, the index entries will refer to DIEs in the separate
(DWO) file. To resolve the DIERef correctly we'd either need to go
through the SymbolFileDWARF to get the full logic for resolving a
DIERef, or use the fact that ToDIERef already looks up the correct unit
while computing its result.

This patch does the latter.

This bug manifested itself in not being able to find type definitions
for types in namespaces, so I've modified one of our type resolving test
cases to run with debug_names, and added a namespaced class into it (it
originally contained only a top-level class).
2024-05-21 12:45:59 +02:00
Pavel Labath
bbd54e08b0
Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (#92503)
…unction (#91321)"

This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was
reverted due to a test failure on aarch64/windows. The failure was
caused by a combination of several factors:
- clang targeting aarch64-windows (unlike msvc, and unlike clang
targeting other aarch64 platforms) defaults to -fomit-frame-pointers
- lldb's code for looking up register values for `<same>` unwind rules
is recursive
- the test binary creates a very long chain of fp-less function frames
(it manages to fit about 22k frames before it blows its stack)

Together, these things have caused lldb to recreate the same deep
recursion when unwinding through this, and blow its own stack as well.
Since lldb frames are larger, about 4k frames like this was sufficient
to trigger the stack overflow.

This version of the patch works around this problem by increasing the
frame size of the test binary, thereby causing it to blow its stack
sooner. This doesn't fix the issue -- the same problem can occur with a
real binary -- but it's not very likely, as it requires an infinite
recursion in a simple (so it doesn't use the frame pointer) function
with a very small frame (so you can fit a lot of them on the stack).

A more principled fix would be to make lldb's lookup code non-recursive,
but I believe that's out of scope for this patch.

The original patch description follows:

A leaf function may not store the link register to stack, but we it can
still end up being a non-zero frame if it gets interrupted by a signal.
Currently, we were unable to unwind past this function because we could
not read the link register value.

To make this work, this patch:
- changes the function-entry unwind plan to include the `fp|lr = <same>`
rules. This in turn necessitated an adjustment in the generic
instruction emulation logic to ensure that `lr=[sp-X]` can override the
`<same>` rule.
- allows the `<same>` rule for pc and lr in all
`m_all_registers_available` frames (and not just frame zero).

The test verifies that we can unwind in a situation like this, and that
the backtrace matches the one we computed before getting a signal.
2024-05-21 10:56:26 +02:00
Pavel Labath
af8f1554b8
[lldb-dap] Don't send expanded descriptions for "hover" expressions (#92726)
VSCode will automatically ask for the children (in structured form) so
there's no point in sending the textual representation. This can make
displaying hover popups for complex variables with complicated data
formatters much faster. See discussion on #77026 for context.
2024-05-21 10:37:41 +02:00
royitaqi
9f62775038
SBDebugger: Add new APIs AddDestroyCallback and RemoveDestroyCallback (#89868)
# Motivation

Individual callers of `SBDebugger::SetDestroyCallback()` might think
that they have registered their callback and expect it to be called when
the debugger is destroyed. In reality, only the last caller survives,
and all previous callers are forgotten, which might be a surprise to
them. Worse, if this is called in a race condition, which callback
survives is less predictable, which may case confusing behavior
elsewhere.

# This PR

Allows multiple destroy callbacks to be registered and all called when
the debugger is destroyed.

**EDIT**: Adds two new APIs: `AddDestroyCallback()` and
`ClearDestroyCallback()`. `SetDestroyCallback()` will first clear then
add the given callback. Tests are added for the new APIs.

## Tests

```
bin/llvm-lit -sv ../external/llvm-project/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
```

## (out-dated, see comments below) Semantic change to
`SetDestroyCallback()`

~~Currently, the method overwrites the old callback with the new one.
With this PR, it will NOT overwrite. Instead, it will hold on to both.
Both callbacks get called during destroy.~~

~~**Risk**: Although the documentation of `SetDestroyCallback()` (see
[C++](https://lldb.llvm.org/cpp_reference/classlldb_1_1SBDebugger.html#afa1649d9453a376b5c95888b5a0cb4ec)
and
[python](https://lldb.llvm.org/python_api/lldb.SBDebugger.html#lldb.SBDebugger.SetDestroyCallback))
doesn't really specify the behavior, there is a risk: if existing call
sites rely on the "overwrite" behavior, they will be surprised because
now the old callback will get called. But as the above said, the current
behavior of "overwrite" itself might be unintended, so I don't
anticipate users to rely on this behavior. In short, this risk might be
less of a problem if we correct it sooner rather than later (which is
what this PR is trying to do).~~

## (out-dated, see comments below) Implementation

~~The implementation holds a `std::vector<std::pair<callback, baton>>`.
When `SetDestroyCallback()` is called, callbacks and batons are appended
to the `std::vector`. When destroy event happen, the `(callback, baton)`
pairs are invoked FIFO. Finally, the `std::vector` is cleared.~~

# (out-dated, see comments below) Alternatives considered

~~Instead of changing `SetDestroyCallback()`, a new method
`AddDestroyCallback()` can be added, which use the same
`std::vector<std::pair<>>` implementation. Together with
`ClearDestroyCallback()` (see below), they will replace and deprecate
`SetDestroyCallback()`. Meanwhile, in order to be backward compatible,
`SetDestroyCallback()` need to be updated to clear the `std::vector` and
then add the new callback. Pros: The end state is semantically more
correct. Cons: More steps to take; potentially maintaining an
"incorrect" behavior (of "overwrite").~~

~~A new method `ClearDestroyCallback()` can be added. Might be
unnecessary at this point, because workflows which need to set then
clear callbacks may exist but shouldn't be too common at least for now.
Such method can be added later when needed.~~

~~The `std::vector` may bring slight performance drawback if its
implementation doesn't handle small size efficiently. However, even if
that's the case, this path should be very cold (only used during init
and destroy). Such performance drawback should be negligible.~~

~~A different implementation was also considered. Instead of using
`std::vector`, the current `m_destroy_callback` field can be kept
unchanged. When `SetDestroyCallback()` is called, a lambda function can
be stored into `m_destroy_callback`. This lambda function will first
call the old callback, then the new one. This way, `std::vector` is
avoided. However, this implementation is more complex, thus less
readable, with not much perf to gain.~~

---------

Co-authored-by: Roy Shi <royshi@meta.com>
2024-05-20 15:51:42 -07:00
royitaqi
e8dc8d614a
Add new Python API SBCommandInterpreter::GetTranscript() (#90703)
# Motivation

Currently, the user can already get the "transcript" (for "what is the
transcript", see `CommandInterpreter::SaveTranscript`). However, the
only way to obtain the transcript data as a user is to first destroy the
debugger, then read the save directory. Note that destroy-callbacks
cannot be used, because 1\ transcript data is private to the command
interpreter (see `CommandInterpreter.h`), and 2\ the writing of the
transcript is *after* the invocation of destory-callbacks (see
`Debugger::Destroy`).

So basically, there is no way to obtain the transcript:
* during the lifetime of a debugger (including the destroy-callbacks,
which often performs logging tasks, where the transcript can be useful)
* without relying on external storage

In theory, there are other ways for user to obtain transcript data
during a debugger's life cycle:
* Use Python API and intercept commands and results.
* Use CLI and record console input/output.

However, such ways rely on the client's setup and are not supported
natively by LLDB.


# Proposal

Add a new Python API `SBCommandInterpreter::GetTranscript()`.

Goals:
* It can be called at any time during the debugger's life cycle,
including in destroy-callbacks.
* It returns data in-memory.

Structured data:
* To make data processing easier, the return type is `SBStructuredData`.
See comments in code for how the data is organized.
* In the future, `SaveTranscript` can be updated to write different
formats using such data (e.g. JSON). This is probably accompanied by a
new setting (e.g. `interpreter.save-session-format`).

# Alternatives

The return type can also be `std::vector<std::pair<std::string,
SBCommandReturnObject>>`. This will make implementation easier, without
having to translate it to `SBStructuredData`. On the other hand,
`SBStructuredData` can convert to JSON easily, so it's more convenient
for user to process.

# Privacy

Both user commands and output/error in the transcript can contain
privacy data. However, as mentioned, the transcript is already available
to the user. The addition of the new API doesn't increase the level of
risk. In fact, it _lowers_ the risk of privacy data being leaked later
on, by avoiding writing such data to external storage.

Once the user (or their code) gets the transcript, it will be their
responsibility to make sure that any required privacy policies are
guaranteed.

# Tests

```
bin/llvm-lit -sv ../external/llvm-project/lldb/test/API/python_api/interpreter/TestCommandInterpreterAPI.py
```

```
bin/llvm-lit -sv ../external/llvm-project/lldb/test/API/commands/session/save/TestSessionSave.py
```

---------

Co-authored-by: Roy Shi <royshi@meta.com>
Co-authored-by: Med Ismail Bennani <ismail@bennani.ma>
2024-05-20 15:49:46 -07:00
Dmitry Vasilyev
2217d1706a
[lldb][Windows] Fixed LibcxxChronoTimePointSecondsSummaryProvider() (#92701)
This patch fixes #92574. It is a replacement for #92575.
2024-05-20 13:44:52 +04:00
Jonas Devlieghere
a4ad05284e
[lldb-dap] Replace assertEquals with assertEqual (NFC)
Fixes new test that were added or modified after #82073. Also fixes a
formatting issue.
2024-05-17 10:12:51 -07:00
Dmitry Vasilyev
d38ea8c4c8
[lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (#92413)
Install `_exe_to_attach` to a remote target if necessary.
2024-05-17 20:14:09 +04:00
Pavel Labath
33bf08ec36
[lldb-dap] Correctly detect alias commands with arguments in repl (#92137)
ResolveCommand will not succeed for an alias command with arguments, and
the code wasn't providing any. Replace that with explicit query(ies) for
the existence of a command with the given name.
2024-05-17 11:24:20 +02:00
Pavel Labath
b27eb0ae82 [lldb] Avoid modifying the source tree in TestCompletion.py
This was a side-effect of the "optimization" in #92281. Deoptimize the
code slightly.
2024-05-17 07:33:26 +00:00
Jacob Lalonde
47d80ec180
[LLDB/Coredump] Only take the Pthread from stack start to the stackpointer + red_zone (#92002)
Currently in Core dumps, the entire pthread is copied, including the
unused space beyond the stack pointer. This causes large amounts of core
dump inflation when the number of threads is high, but the stack usage
is low. Such as when an application is using a thread pool.

This change will optimize for these situations in addition to generally
improving the core dump performance for all of lldb.
2024-05-16 14:17:19 -07:00
Dmitry Vasilyev
c7ae8c6639
[lldb] Fixed the DAP tests in case of a remote target (#92416)
These tests are based on dap_server which runs locally. These tests
failed in case of Windows host and Linux target.
2024-05-16 21:30:31 +04:00
Dmitry Vasilyev
d665d51c92
[lldb] Fixed the DAP tests in case of a remote target (#92398)
These tests failed in case of Windows host and Linux target, because
dap_server tried to run ELF file on Windows.
2024-05-16 18:34:58 +04:00
Dmitry Vasilyev
2bc9af9656
[lldb][Windows] Disable the TestGdbRemoteLibrariesSvr4Support test for Windows host (#92341)
Windows does not allow quotes in file names. So it is impossible to
build `libsvr4lib_b".so` on Windows.
2024-05-16 16:49:56 +04:00
Dmitry Vasilyev
ce961c5607
[lldb] Fixed the TestFdLeak test (#92273)
Use `os.devnull` instead of `/dev/null`.
2024-05-16 07:44:08 +04:00
Dave Lee
8530b1c464
[lldb] Support custom LLVM formatting for variables (#91868)
Re-apply https://github.com/llvm/llvm-project/pull/81196, with a fix that handles the 
absence of llvm formatting: 
https://github.com/llvm/llvm-project/pull/91868/commits/3ba650e91eded3543764f37921dcce3b
b47d425f
2024-05-15 14:44:42 -07:00
Dmitry Vasilyev
d92c67784f
[lldb][Windows] Fixed the TestIOHandlerResizeNoEditline test (#92286)
This test caused python crash on Windows x86_64 host with the exit code
0xC0000409 (STATUS_STACK_BUFFER_OVERRUN). Close the input stream before
exit to avoid this crash.
2024-05-15 21:08:35 +04:00
Dmitry Vasilyev
7645269710
[lldb] Fixed the TestNetBSDCore test (#92285)
TestNetBSDCore.py contains 3 classes with the same test names
test_aarch64 and test_amd64. It causes conflicts because the same build
dir. Add suffixes to avoid conflicts.
2024-05-15 21:06:30 +04:00
Dmitry Vasilyev
eb822dc258
[lldb] Fixed the TestCompletion test running on a remote target (#92281)
Install the image to the remote target if necessary.
2024-05-15 21:03:15 +04:00
Dmitry Vasilyev
fc1df55bcf
[lldb][Windows] Fixed the test gdb_remote_client/TestGDBRemotePlatformFile (#92088)
The tests `test_file_permissions` and `test_file_permissions_fallback`
are disabled for Windows target. These tests use MockGDBServerResponder
and do not depend on the real target. These tests failed in case of
Windows host and Linux target. Disable them for Windows host too.
2024-05-15 20:50:58 +04:00
Dmitry Vasilyev
34f33babc2
[lldb] Fixed the TestGdbRemoteCompletion test (#92268)
Do not try to run lldb-server on localhost in case of the remote target.
2024-05-15 20:48:16 +04:00
Dmitry Vasilyev
eacefba9aa
[lldb][Windows] Fixed tests TestPty and TestPtyServer (#92090)
The tests TestPty and TestPtyServer use the Unix specific python builtin
module termios. They are failed in case of Windows host and Linux
target. Disable them for Windows host too.
2024-05-15 14:44:24 +04:00
David Spickett
03bdfb6561
[lldb][test][FreeBSD] Fix some concurrent event tests (#84155)
A lot of `TestConcurrent*.py` expect one of the threads to crash, but we
weren't checking for it properly.

Possibly because signal reporting got better on FreeBSD at some point,
and it now shows the same info as Linux does.

```
  lldb-api :: functionalities/inferior-changed/TestInferiorChanged.py
  lldb-api :: functionalities/inferior-crashing/TestInferiorCrashing.py
  lldb-api :: functionalities/inferior-crashing/TestInferiorCrashingStep.py
  lldb-api :: functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
  lldb-api :: functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
  lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py
  lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py
  lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
  lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
```

Fixes #48777

`TestConcurrentTwoBreakpointsOneSignal.py` no longer fails, at least on
an AWS instance, so I've removed the xfail there.
2024-05-15 11:25:15 +01:00
Pavel Labath
f090801a96 [lldb] Disable unaligned-pc-sigbus.test on arm(32)
I though the test could work there as well, but (of course) it does not,
because the lowest bit just means "run the code as thumb".
2024-05-15 09:18:42 +00:00