History log of /llvm-project/lldb/packages/Python/lldbsuite/test/lldbutil.py (Results 1 – 25 of 69)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# aba0476f 24-Nov-2024 Dave Lee <davelee.com@gmail.com>

[lldb] Delete lldbutil.PrintableRegex (NFC)

Use of this class wasn't making use of the original regex string. Note that `re.Pattern`
has a `pattern` property to access the original regex.


# 8b621147 24-Nov-2024 Dave Lee <davelee.com@gmail.com>

[lldb] Delete unused lldbutil.print_registers (NFC)


# 0bfc9514 25-Nov-2024 Dave Lee <davelee.com@gmail.com>

[lldb] Remove lldbutil.get_stack_frames (NFC) (#117505)

`SBThread.frames` can be used instead of `get_stack_frames`.


Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# 7e744728 12-Sep-2024 Felipe de Azevedo Piovezan <fpiovezan@apple.com>

[lldb][testing] Check all stop reasons in get_threads_stopped_at_breakpoint_id (#108281)

If multiple breakpoints are hit at the same time, multiple stop reasons
are reported, one per breakpoint.

[lldb][testing] Check all stop reasons in get_threads_stopped_at_breakpoint_id (#108281)

If multiple breakpoints are hit at the same time, multiple stop reasons
are reported, one per breakpoint.

Currently, `get_threads_stopped_at_breakpoint_id` only checks the first
such reason.

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 58611451 26-Jun-2024 Eisuke Kawashima <e.kawaschima+github@gmail.com>

[lldb] fix(lldb/**.py): fix comparison to None (#94017)

from PEP8
(https://peps.python.org/pep-0008/#programming-recommendations):

> Comparisons to singletons like None should always be done wit

[lldb] fix(lldb/**.py): fix comparison to None (#94017)

from PEP8
(https://peps.python.org/pep-0008/#programming-recommendations):

> Comparisons to singletons like None should always be done with is or
is not, never the equality operators.

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6
# 03bdfb65 15-May-2024 David Spickett <david.spickett@linaro.org>

[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

[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.

show more ...


# c441aa51 14-May-2024 Dmitry Vasilyev <dvassiliev@accesssoftek.com>

[lldb] Add lldbutil.install_to_target() helper (#91944)

It can be used in tests #91918, #91931 and such.


Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 80fcecb1 17-Feb-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Replace assertEquals with assertEqual (NFC) (#82073)

assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a

[lldb] Replace assertEquals with assertEqual (NFC) (#82073)

assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.

show more ...


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# e634c2f7 11-Aug-2023 Alex Langford <alangford@apple.com>

[lldb] Remove use of __future__ in python

These were useful primarily for the Python 2 to 3 transition. Python 2
is no longer supported so these are no longer necessary.

Differential Revision: http

[lldb] Remove use of __future__ in python

These were useful primarily for the Python 2 to 3 transition. Python 2
is no longer supported so these are no longer necessary.

Differential Revision: https://reviews.llvm.org/D157759

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5
# 2238dcc3 25-May-2023 Jonas Devlieghere <jonas@devlieghere.com>

[NFC][Py Reformat] Reformat python files in lldb

This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problem

[NFC][Py Reformat] Reformat python files in lldb

This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problems merging this commit because you have made
changes to a python file, the best way to handle that is to run `git
checkout --ours <yourfile>` and then reformat it with black.

RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential revision: https://reviews.llvm.org/D151460

show more ...


Revision tags: llvmorg-16.0.4, llvmorg-16.0.3
# 34bd1579 25-Apr-2023 Med Ismail Bennani <medismail.bennani@gmail.com>

[lldb/test] Update lldbutil.fetch_next_event to match broadcaster class

This patch updates the `lldbutil.fetch_next_event` helper function to
either match a specific broadcaster or match a whole bro

[lldb/test] Update lldbutil.fetch_next_event to match broadcaster class

This patch updates the `lldbutil.fetch_next_event` helper function to
either match a specific broadcaster or match a whole broadcaster class.

This is very handy when testing process events for interactive scripted
process debugging.

This also fixes a bug in the failing case, where `SBEvent.GetDescription`
expects a `SBStream` argument. We never took that code path in the
original implementation so we didn't hit that bug.

Differential Revision: https://reviews.llvm.org/D149175

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

show more ...


Revision tags: llvmorg-16.0.2, llvmorg-16.0.1
# a78997e0 04-Apr-2023 Adrian Prantl <aprantl@apple.com>

Simplify test.

This test doesn't actually depend on being able to launch the process.
This may or may not explain why this test behaves oddly on some of our bots.


Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3
# 91389000 21-Aug-2022 Adrian Vogelsgesang <avogelsgesang@salesforce.com>

[LLDB] Add data formatter for std::coroutine_handle

This patch adds a formatter for `std::coroutine_handle`, both for libc++
and libstdc++. For the type-erased `coroutine_handle<>`, it shows the
`re

[LLDB] Add data formatter for std::coroutine_handle

This patch adds a formatter for `std::coroutine_handle`, both for libc++
and libstdc++. For the type-erased `coroutine_handle<>`, it shows the
`resume` and `destroy` function pointers. For a non-type-erased
`coroutine_handle<promise_type>` it also shows the `promise` value.

With this change, executing the `v t` command on the example from
https://clang.llvm.org/docs/DebuggingCoroutines.html now outputs

```
(task) t = {
handle = coro frame = 0x55555555b2a0 {
resume = 0x0000555555555a10 (a.out`coro_task(int, int) at llvm-example.cpp:36)
destroy = 0x0000555555556090 (a.out`coro_task(int, int) at llvm-example.cpp:36)
}
}
```

instead of just

```
(task) t = {
handle = {
__handle_ = 0x55555555b2a0
}
}
```

Note, how the symbols for the `resume` and `destroy` function pointer
reveal which coroutine is stored inside the `std::coroutine_handle`.
A follow-up commit will use this fact to infer the coroutine's promise
type and the representation of its internal coroutine state based on
the `resume` and `destroy` pointers.

The same formatter is used for both libc++ and libstdc++. It would
also work for MSVC's standard library, however it is not registered
for MSVC, given that lldb does not provide pretty printers for other
MSVC types, either.

The formatter is in a newly added `Coroutines.{h,cpp}` file because there
does not seem to be an already existing place where we could share
formatters across libc++ and libstdc++. Also, I expect this code to grow
as we improve debugging experience for coroutines further.

**Testing**

* Added API test

Differential Revision: https://reviews.llvm.org/D132415

show more ...


Revision tags: llvmorg-15.0.0-rc2
# 56f9cfe3 05-Aug-2022 Dave Lee <davelee.com@gmail.com>

[lldb] Remove uses of six module (NFC)

With lldb (& llvm) requiring Python 3.6+, use of the `six` module can be removed.

Differential Revision: https://reviews.llvm.org/D131304


# e49c1568 04-Aug-2022 Dave Lee <davelee.com@gmail.com>

[lldb] Dynamically generate enum names in lldbutil

Change the `<enum>_to_str` functions in lldbutil to be dynamic.

Instead of a manually maintained if/elif switch, the functions now perform
lookup

[lldb] Dynamically generate enum names in lldbutil

Change the `<enum>_to_str` functions in lldbutil to be dynamic.

Instead of a manually maintained if/elif switch, the functions now perform
lookup in a dynamically generated dict. The names are determined by stripping
the enum's prefix, and then lowercasing the remaining suffix, ex:

eStateRunning -> "running"

Differential Revision: https://reviews.llvm.org/D131138

show more ...


# 0f821339 03-Aug-2022 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Add assertStopReason helper function

Add a function to make it easier to debug a test failure caused by an
unexpected stop reason. This is similar to the assertState helper that
was added in

[lldb] Add assertStopReason helper function

Add a function to make it easier to debug a test failure caused by an
unexpected stop reason. This is similar to the assertState helper that
was added in ce825e46743b.

Before:

self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: 5 != 10

After:

self.assertStopReason(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: signal (5) != instrumentation (10)

Differential revision: https://reviews.llvm.org/D131083

show more ...


Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init
# ec48a0df 07-Jul-2022 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Improve the error message in run_to_breakpoint_do_run

Improve the error message when we fail to hit the initial breakpoint in
run_to_breakpoint_do_run. In addition to the process state, we no

[lldb] Improve the error message in run_to_breakpoint_do_run

Improve the error message when we fail to hit the initial breakpoint in
run_to_breakpoint_do_run. In addition to the process state, we now also
report the exit code and reason (if the process exited) as well as the
inferior's output.

Differential revision: https://reviews.llvm.org/D111978

show more ...


# 1b8c7352 30-Jun-2022 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Use assertState in even more tests (NFC)

Followup to D127355 and D127378, converting more instances of
assertEqual to assertState.


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# 134d7f9a 18-May-2022 Jim Ingham <jingham@apple.com>

Store a by name list of signals with their actions in the Target
so that they can be used to prime new Process runs. "process handle"
was also changed to populate the dummy target if there's no sele

Store a by name list of signals with their actions in the Target
so that they can be used to prime new Process runs. "process handle"
was also changed to populate the dummy target if there's no selected
target, so that the settings will get copied into new targets.

Differential Revision: https://reviews.llvm.org/D126259

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# 9216baf8 23-Mar-2022 Med Ismail Bennani <medismail.bennani@gmail.com>

[lldb/test] Add events listener helper function to lldbtest

This patch introduces 2 new lldb utility functions:
- lldbutil.start_listening_from: This can be called in the test setup to
create a li

[lldb/test] Add events listener helper function to lldbtest

This patch introduces 2 new lldb utility functions:
- lldbutil.start_listening_from: This can be called in the test setup to
create a listener and set it up for a specific event mask and add it
to the user-provided broadcaster's list.
- lldbutil.fetch_next_event: This will use fetch a single event from the
provided istener and return it if it matches the provided broadcaster.

The motivation behind this is to easily test new kinds of events
(i.e. Swift type-system progress events). However, this patch also
updates `TestProgressReporting.py` and `TestDiagnosticReporting.py`
to make use of these new helper functions.

Differential Revision: https://reviews.llvm.org/D122193

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

show more ...


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# c52ff0cf 24-Nov-2021 SYNOPSYS\georgiev <georgiev@synopsys.com>

[LLDB/test] lldbutil check_breakpoint() - check target instance

Check test.target instance type before we attempt to get the breakpoint.
This fix is suggested by 'clayborg'.
Ref: https://reviews.llv

[LLDB/test] lldbutil check_breakpoint() - check target instance

Check test.target instance type before we attempt to get the breakpoint.
This fix is suggested by 'clayborg'.
Ref: https://reviews.llvm.org/D111899#inline-1090156

show more ...


Revision tags: llvmorg-13.0.1-rc1
# 9f0b5f9a 17-Nov-2021 SYNOPSYS\georgiev <georgiev@synopsys.com>

[lldb/test] Added lldbutil function to test a breakpoint

Testing the breakpoint itself rather than the lldb string.

Differential Revision: https://reviews.llvm.org/D111899


# 9a2e9c5d 16-Oct-2021 Jim Ingham <jingham@apple.com>

Add tests for the other variants of BreakpointCreateBySourceRegex.

I added some tests for the case where the breakpoints take immediately
to the extant test case, and made a new test case for when t

Add tests for the other variants of BreakpointCreateBySourceRegex.

I added some tests for the case where the breakpoints take immediately
to the extant test case, and made a new test case for when the source
regex breakpoint will be set in a dlopen-ed library.

I also noticed when doing this that "lldbutil.run_to_source_breakpoint
can't handle the case where the breakpoint will be in a dlopen-ed
library, since it requires the breakpoint to have at least 1 location
before run. I fixed that by adding a parameter to say whether a
before run location is expected.

Differential Revision: https://reviews.llvm.org/D111920

show more ...


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4
# 6c37984e 29-Mar-2021 Michał Górny <mgorny@moritz.systems>

[lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork

Introduce three new stop reasons for fork, vfork and vforkdone events.
This includes server support for serializing fork/vfor

[lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork

Introduce three new stop reasons for fork, vfork and vforkdone events.
This includes server support for serializing fork/vfork events into
gdb-remote protocol. The stop infos for the two base events take a pair
of PID and TID for the newly forked process.

Differential Revision: https://reviews.llvm.org/D100196

show more ...


# 5d1c43f3 21-Apr-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Use the compiler from the SDK in simulator tests

Use the clang compiler from the SDK to build the simulator test programs
to ensure we pick up the correct libc++.


123