llvm-project/lldb
Pavel Labath 2c4226f8ac [lldb-server][linux] Add ability to allocate memory
This patch adds support for the _M and _m gdb-remote packets, which
(de)allocate memory in the inferior. This works by "injecting" a
m(un)map syscall into the inferior. This consists of:
- finding an executable page of memory
- writing the syscall opcode to it
- setting up registers according to the os syscall convention
- single stepping over the syscall

The advantage of this approach over calling the mmap function is that
this works even in case the mmap function is buggy or unavailable. The
disadvantage is it is more platform-dependent, which is why this patch
only works on X86 (_32 and _64) right now. Adding support for other
linux architectures should be easy and consist of defining the
appropriate syscall constants. Adding support for other OSes depends on
the its ability to do a similar trick.

Differential Revision: https://reviews.llvm.org/D89124
2020-10-14 15:02:09 +02:00
..
bindings Fix use of wrong printf format specifier for size_t argument. 2020-09-29 16:02:08 -07:00
cmake [lldb] Add a cmake warning about the python/swig incompatibility 2020-10-08 18:42:50 +02:00
docs [lldb] Note difference in vFile:pread/pwrite format for lldb 2020-10-12 15:09:49 +01:00
examples [lldb/examples] Add missing declaration in heap.py 2020-09-24 08:44:45 -07:00
include/lldb [lldb-server][linux] Add ability to allocate memory 2020-10-14 15:02:09 +02:00
packages/Python [lldb] Don't add no-sandbox entitlement when running tests on simulator 2020-10-13 15:08:46 +02:00
resources
scripts [LLDB] Add QEMU testing environment setup guide for SVE testing 2020-10-06 12:35:08 +05:00
source [lldb-server][linux] Add ability to allocate memory 2020-10-14 15:02:09 +02:00
test [lldb-server][linux] Add ability to allocate memory 2020-10-14 15:02:09 +02:00
third_party/Python/module Revert "[lldb] temporary commit to see why a test is failing only on lldb-aarch64-ubuntu" 2020-08-05 11:55:02 +02:00
tools Remove unused build configurations from debugserver xcode project 2020-10-13 16:39:30 -07:00
unittests [lldb-server][linux] Add ability to allocate memory 2020-10-14 15:02:09 +02:00
utils [lldb] Hoist -s (trace directory) argument out of LLDB_TEST_COMMON_ARGS (NFC) 2020-09-29 17:23:33 -07:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore
CMakeLists.txt Create ${swig_target}-scripts target instead of lldb-python-scripts 2020-08-22 19:36:37 -07:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT
use_lldb_suite_root.py