diff options
| author | Peter S. Housel <housel@acm.org> | 2021-07-16 00:42:28 +0200 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2021-07-16 00:45:22 +0200 |
| commit | 2e7ec447cc7eab89a72413ad91a897049f551c56 (patch) | |
| tree | 754a7a521322950c8a6488ca6281671658e9aedd /lldb/test/API/python_api/process/main.cpp | |
| parent | bba8a76b8736fcf005ebbd0a4fb789a22eadf9ba (diff) | |
[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
Diffstat (limited to 'lldb/test/API/python_api/process/main.cpp')
| -rw-r--r-- | lldb/test/API/python_api/process/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/test/API/python_api/process/main.cpp b/lldb/test/API/python_api/process/main.cpp index f3cc7e12d335..07cde05e2a05 100644 --- a/lldb/test/API/python_api/process/main.cpp +++ b/lldb/test/API/python_api/process/main.cpp @@ -21,3 +21,13 @@ int main (int argc, char const *argv[]) return 0; // Set break point at this line and check variable 'my_char'. // Use lldb Python API to set memory content for my_int and check the result. } + +char test_read (char *ptr) +{ + return *ptr; +} + +void test_write (char *ptr, char c) +{ + *ptr = c; +} |
