summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-12-06 22:49:16 +0000
committerGreg Clayton <gclayton@apple.com>2012-12-06 22:49:16 +0000
commitb9d5df58d4312bb7d9602b870df13a0713509f94 (patch)
tree5fd570e84261278d1173cf0358f84581b14854a9 /lldb/source/Plugins/Process/gdb-remote
parent39dd38c06185542e44e82f938824e041685b95c6 (diff)
downloadbcm5719-llvm-b9d5df58d4312bb7d9602b870df13a0713509f94.tar.gz
bcm5719-llvm-b9d5df58d4312bb7d9602b870df13a0713509f94.zip
<rdar://problem/12820334>
I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like: memory read <addr> [<end-addr>] memory write <addr> breakpoint set --address <addr> disassemble --start-address <addr> --end-address <addr> It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers. llvm-svn: 169556
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 900726c56bd..9269c267d7e 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2050,7 +2050,7 @@ ProcessGDBRemote::DoReadMemory (addr_t addr, void *buf, size_t size, Error &erro
return response.GetHexBytes(buf, size, '\xdd');
}
else if (response.IsErrorResponse())
- error.SetErrorString("memory read failed");
+ error.SetErrorStringWithFormat("memory read failed for 0x%" PRIx64, addr);
else if (response.IsUnsupportedResponse())
error.SetErrorStringWithFormat("GDB server does not support reading memory");
else
@@ -2086,7 +2086,7 @@ ProcessGDBRemote::DoWriteMemory (addr_t addr, const void *buf, size_t size, Erro
return size;
}
else if (response.IsErrorResponse())
- error.SetErrorString("memory write failed");
+ error.SetErrorStringWithFormat("memory write failed for 0x%" PRIx64, addr);
else if (response.IsUnsupportedResponse())
error.SetErrorStringWithFormat("GDB server does not support writing memory");
else
OpenPOWER on IntegriCloud