diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-04-29 17:24:48 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-04-29 17:24:48 +0000 |
commit | 3eb4b4589e0094a39fa2e1a8b1e9f585b6cdaa69 (patch) | |
tree | 3962354cbc0c3233a9bd4d31f75c321f240a33ec /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | 387ce30685ae178c87588fe9b5e18d7f1ff76864 (diff) | |
download | llvm-3eb4b4589e0094a39fa2e1a8b1e9f585b6cdaa69.zip llvm-3eb4b4589e0094a39fa2e1a8b1e9f585b6cdaa69.tar.gz llvm-3eb4b4589e0094a39fa2e1a8b1e9f585b6cdaa69.tar.bz2 |
Remove trap code from disassembly.
Summary:
NativeProcessProtocol uses ReadMemory internally for setting/checking
breakpoints but also for generic memory reads (Handle_m), this change adds a
ReadMemoryWithoutTrap for that purpose. Also fixes a bunch of misuses of addr_t
as size/length.
Test Plan: `disassemble` no longer shows the trap code.
Reviewers: jingham, vharron, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9330
llvm-svn: 236132
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index d4bbb6f..47dc849 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1846,8 +1846,8 @@ GDBRemoteCommunicationServerLLGS::Handle_m (StringExtractorGDBRemote &packet) // Retrieve the process memory. - lldb::addr_t bytes_read = 0; - Error error = m_debugged_process_sp->ReadMemory (read_addr, &buf[0], byte_count, bytes_read); + size_t bytes_read = 0; + Error error = m_debugged_process_sp->ReadMemoryWithoutTrap(read_addr, &buf[0], byte_count, bytes_read); if (error.Fail ()) { if (log) @@ -1863,7 +1863,7 @@ GDBRemoteCommunicationServerLLGS::Handle_m (StringExtractorGDBRemote &packet) } StreamGDBRemote response; - for (lldb::addr_t i = 0; i < bytes_read; ++i) + for (size_t i = 0; i < bytes_read; ++i) response.PutHex8(buf[i]); return SendPacketNoLock(response.GetData(), response.GetSize()); @@ -1917,7 +1917,7 @@ GDBRemoteCommunicationServerLLGS::Handle_M (StringExtractorGDBRemote &packet) // Convert the hex memory write contents to bytes. StreamGDBRemote response; - const uint64_t convert_count = static_cast<uint64_t> (packet.GetHexBytes (&buf[0], byte_count, 0)); + const uint64_t convert_count = packet.GetHexBytes(&buf[0], byte_count, 0); if (convert_count != byte_count) { if (log) @@ -1926,7 +1926,7 @@ GDBRemoteCommunicationServerLLGS::Handle_M (StringExtractorGDBRemote &packet) } // Write the process memory. - lldb::addr_t bytes_written = 0; + size_t bytes_written = 0; Error error = m_debugged_process_sp->WriteMemory (write_addr, &buf[0], byte_count, bytes_written); if (error.Fail ()) { |