summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/MachTask.h
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2011-11-08 04:28:12 +0000
committerJason Molenda <jmolenda@apple.com>2011-11-08 04:28:12 +0000
commit1f3966bebd9e08b40c6185b9b39938b5d06d5ef5 (patch)
tree53e2b7ddc697fd04cd25095145b9b55eb47abcbd /lldb/tools/debugserver/source/MacOSX/MachTask.h
parent9586cdb01e1086c851911d8d3cbb5da6c2193505 (diff)
downloadbcm5719-llvm-1f3966bebd9e08b40c6185b9b39938b5d06d5ef5.tar.gz
bcm5719-llvm-1f3966bebd9e08b40c6185b9b39938b5d06d5ef5.zip
Add "QAddressIsExecutable" packet to debugserver. Used to test
whether a given address is in an executable region of memory or not. I haven't written the lldb side that will use this packet it hasn't been tested yet but it's a simple enough bit of code. I want to have this feature available for the unwinder code. When we're stopped at an address with no valid symbol context, there are a number of questions I'd like to ask -- is the current pc value in an executable region (e.g. did they jump to unallocated/unexecutable memory? we know how to unwind from here if so.) Is the stack pointer or the frame pointer the correct register to use to find the caller's saved pc value? Once we're past the first frame we can trust things like eh_frame and ABI unwind schemes but the first frame is challenging and having a way to check potential addresses to see if they're executable or not would help narrow down the possibilities a lot. llvm-svn: 144074
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachTask.h')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachTask.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.h b/lldb/tools/debugserver/source/MacOSX/MachTask.h
index 0e74086a727..da64ba6c997 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachTask.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachTask.h
@@ -64,6 +64,7 @@ public:
nub_size_t ReadMemory (nub_addr_t addr, nub_size_t size, void *buf);
nub_size_t WriteMemory (nub_addr_t addr, nub_size_t size, const void *buf);
+ bool IsAddressExecutable (nub_addr_t addr) ;
nub_addr_t AllocateMemory (nub_size_t size, uint32_t permissions);
nub_bool_t DeallocateMemory (nub_addr_t addr);
OpenPOWER on IntegriCloud