History log of /llvm-project/lldb/test/API/python_api/process/TestProcessAPI.py (Results 1 – 21 of 21)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, 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
# 9c246882 21-Feb-2024 Jordan Rupprecht <rupprecht@google.com>

[lldb][test] Modernize asserts (#82503)

This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsne

[lldb][test] Modernize asserts (#82503)

This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).

For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.

show more ...


Revision tags: llvmorg-18.1.0-rc3, 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, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5
# 14186773 31-May-2023 Jim Ingham <jingham@apple.com>

Fix SBValue::FindValue for file static variables

This was just a thinko. The API StackFrame::GetVariableList takes a
bool for "get_file_globals" which if true will also find file statics
and file gl

Fix SBValue::FindValue for file static variables

This was just a thinko. The API StackFrame::GetVariableList takes a
bool for "get_file_globals" which if true will also find file statics
and file globals. But we only were passing that as true if the
ValueType was eValueTypeVariableGlobal, which meant that we never find
file statics. It's okay if we cast too wide a net when we do
GetVariableList as later on we check against the ValueType to filter
globals from statics.

There was a test that had a whole bunch of globals and tested
FindValue on all of them, but had no statics. So I just made one of
the globals a file static, which verifies the fix.

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

show more ...


# 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, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# e6cac17b 04-Mar-2023 Med Ismail Bennani <medismail.bennani@gmail.com>

[lldb] Extend SWIG SBProcess interface with WriteMemoryAsCString method

This patch tries to address an interoperability issue when writing
python string into the process memory.

Since the python st

[lldb] Extend SWIG SBProcess interface with WriteMemoryAsCString method

This patch tries to address an interoperability issue when writing
python string into the process memory.

Since the python string is not null-terminated, it would still be
written to memory however, when trying to read it again with
`SBProcess::ReadCStringFromMemory`, the memory read would fail, since
the read string doens't contain a null-terminator, and therefore is not
a valid C string.

To address that, this patch extends the `SBProcess` SWIG interface to
expose a new `WriteMemoryAsCString` method that is only exposed to the
SWIG target language. That method checks that the buffer to write is
null-terminated and otherwise, it appends a null byte at the end of it.

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

show more ...


Revision tags: llvmorg-16.0.0-rc3
# 49470f1e 09-Feb-2023 Jason Molenda <jason@molenda.com>

Remove test case that tries to allocate impossible amounts

The sanitizer bots are failing with this test; they
impose a maximum 0x10000000000 size on allocations, and
malloc on darwin will let me ma

Remove test case that tries to allocate impossible amounts

The sanitizer bots are failing with this test; they
impose a maximum 0x10000000000 size on allocations, and
malloc on darwin will let me malloc that much. The
alternative to keep this would be to break it out into a
seperate test in TestProcessAIP and skip that if it's on
the sanitizer, but this is seeming too fragile IMO so I'm
punting it entirely.

show more ...


Revision tags: llvmorg-16.0.0-rc2
# b1d8f404 08-Feb-2023 Jason Molenda <jason@molenda.com>

Only run the weird new try-to-read-too-much test on Darwin

I'm still getting linux CI bot failures for this test. It's not
critical, and it depends on a failure mode that is true on Darwin
but I wa

Only run the weird new try-to-read-too-much test on Darwin

I'm still getting linux CI bot failures for this test. It's not
critical, and it depends on a failure mode that is true on Darwin
but I was always gambling that it might fail in the same way on
other systems.

show more ...


# 4a8cc285 07-Feb-2023 Jason Molenda <jason@molenda.com>

Fix TestProcessAPI.py to only allocate sys.maxsize buffer

I hardcoded nearly a UINT64_MAX number in this test case,
and python is not able to convert it to a long on some
platforms. Use sys.maxsize

Fix TestProcessAPI.py to only allocate sys.maxsize buffer

I hardcoded nearly a UINT64_MAX number in this test case,
and python is not able to convert it to a long on some
platforms. Use sys.maxsize instead; this also would have
failed if the testsuite was run on a 32-bit system.

show more ...


# 62c74751 07-Feb-2023 Jason Molenda <jason@molenda.com>

Check if null buffer handed to SBProcess::ReadMemory

Add a check for a null destination buffer in SBProcess::ReadMemory,
and return an error if that happens. If a Python SB API script
tries to allo

Check if null buffer handed to SBProcess::ReadMemory

Add a check for a null destination buffer in SBProcess::ReadMemory,
and return an error if that happens. If a Python SB API script
tries to allocate a huge amount of memory, the malloc done by the
intermediate layers will fail and will hand a null pointer to
ReadMemory. lldb will eventually crash trying to write in to that
buffer.

Also add a test that tries to allocate an impossibly large amount
of memory, and hopefully should result in a failed malloc and hitting
this error codepath.

Differential Revision: https://reviews.llvm.org/D143012
rdar://104846609

show more ...


# c1928033 03-Feb-2023 Med Ismail Bennani <medismail.bennani@gmail.com>

[lldb] Add a way to get a scripted process implementation from the SBAPI

This patch introduces a new `GetScriptedImplementation` method to the
SBProcess class in the SBAPI. It will allow users of Sc

[lldb] Add a way to get a scripted process implementation from the SBAPI

This patch introduces a new `GetScriptedImplementation` method to the
SBProcess class in the SBAPI. It will allow users of Scripted Processes to
fetch the scripted implementation object from to script interpreter to be
able to interact with it directly (without having to go through lldb).

This allows to user to perform action that are not specified in the
scripted process interface, like calling un-specified methods, but also
to enrich the implementation, by passing it complex objects.

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

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

show more ...


Revision tags: 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
# 193259cb 12-Aug-2022 David Spickett <david.spickett@linaro.org>

[LLDB] Remove __future__ imports from tests

Not needed now that we require python 3.

Reviewed By: kastiglione, JDevlieghere

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


Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6
# 4cc8f2a0 17-Jun-2022 Dave Lee <davelee.com@gmail.com>

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


Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# 66b829ac 08-Apr-2022 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Skip a bunch of tests that shouldn't run remotely

Skip a bunch of tests that don't really make sense to run remotely.


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, llvmorg-13.0.1-rc1
# b505ed9d 30-Sep-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Remove support for replaying the test suite from a reproducer

This patch removes the infrastructure to replay the test suite from a
reproducer, as well as the modifications made to the indivi

[lldb] Remove support for replaying the test suite from a reproducer

This patch removes the infrastructure to replay the test suite from a
reproducer, as well as the modifications made to the individual tests.

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
# 2e7ec447 15-Jul-2021 Peter S. Housel <housel@acm.org>

[lldb] Add AllocateMemory/DeallocateMemory to the SBProcess API

This change adds AllocateMemory and DeallocateMemory methods to the SBProcess
API, so that clients can allocate and deallocate memory

[lldb] Add AllocateMemory/DeallocateMemory to the SBProcess API

This change adds AllocateMemory and DeallocateMemory methods to the SBProcess
API, so that clients can allocate and deallocate memory blocks within the
process being debugged (for storing JIT-compiled code or other uses).

(I am developing a debugger + REPL using the API; it will need to store
JIT-compiled code within the target.)

Reviewed By: clayborg, jingham

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

show more ...


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2
# 2606918f 05-Jun-2021 Bruce Mitchener <bruce.mitchener@gmail.com>

Revert "[LLDB/API] Expose args and env from SBProcessInfo."

This reverts commit 8d33437d030af27fff21dd3fd0e66893b0148217.

This broke one of the buildbots.


# 8d33437d 04-Jun-2021 Bruce Mitchener <bruce.mitchener@gmail.com>

[LLDB/API] Expose args and env from SBProcessInfo.

This is another step towards implementing the equivalent of
`platform process list` and related functionality.

`uint32_t` is used for the argument

[LLDB/API] Expose args and env from SBProcessInfo.

This is another step towards implementing the equivalent of
`platform process list` and related functionality.

`uint32_t` is used for the argument count and index despite the
underlying value being `size_t` to be consistent with other
index-based access to arguments.

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

show more ...


# 251a5d9d 30-May-2021 Bruce Mitchener <bruce.mitchener@gmail.com>

[lldb/API] Expose triple for SBProcessInfo.

This is present when doing a `platform process list` and is
tracked by the underlying code. To do something like the
process list via the SB API in the fu

[lldb/API] Expose triple for SBProcessInfo.

This is present when doing a `platform process list` and is
tracked by the underlying code. To do something like the
process list via the SB API in the future, this must be
exposed.

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

show more ...


Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2
# 05d7d694 03-Feb-2021 Tatyana Krasnukha <tatyana@synopsys.com>

[lldb/tests] Removed add_test_categories decorator for python API tests, NFC

There is a .categories file in the python_api directory that makes all nested tests
belong to the category "pyapi". The d

[lldb/tests] Removed add_test_categories decorator for python API tests, NFC

There is a .categories file in the python_api directory that makes all nested tests
belong to the category "pyapi". The decorator is unnecessary for these tests.

show more ...


Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2
# 86aa8e63 06-Aug-2020 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Use target.GetLaunchInfo() instead of creating an empty one.

Update tests that were creating an empty LaunchInfo instead of using the
one coming from the target. This ensures target propertie

[lldb] Use target.GetLaunchInfo() instead of creating an empty one.

Update tests that were creating an empty LaunchInfo instead of using the
one coming from the target. This ensures target properties are honored.

show more ...


Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2
# 7606a543 21-May-2020 Jonas Devlieghere <jonas@devlieghere.com>

[lldb/Reproducers] Fix/skip passive replay failures in python_api subdir

Fixes or skips tests in the python_api subdirectory that were failing
with passive replay.


Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2
# 99451b44 11-Feb-2020 Jordan Rupprecht <rupprecht@google.com>

[lldb][test] Remove symlink for API tests.

Summary: Moves lldbsuite tests to lldb/test/API.

This is a largely mechanical change, moved with the following steps:

```
rm lldb/test/API/testcases
mkdi

[lldb][test] Remove symlink for API tests.

Summary: Moves lldbsuite tests to lldb/test/API.

This is a largely mechanical change, moved with the following steps:

```
rm lldb/test/API/testcases
mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}
mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner
for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done
```

lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.

Reviewers: labath, JDevlieghere

Tags: #lldb

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

show more ...