[Process] Fix WriteMemory return value
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Mon, 1 Apr 2019 19:08:47 +0000 (19:08 +0000)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Mon, 1 Apr 2019 19:08:47 +0000 (19:08 +0000)
commit62bcf736834247905166c4755aa7e71768ac3a1c
tree19006cadc28facfff4cbcdc53cc6ba72e7899980
parent4307172b8413fd40a63cd9adf54973e641a891ba
[Process] Fix WriteMemory return value

Summary:
In case of a breakpoint site overlapping with the destination address,
the WriteMemory method reported an incorrect memory size.

Instead of returning the right amount of bytes written, it falls through
the scope and returned 0.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Reviewers: jasonmolenda, friss, jingham

Subscribers: JDevlieghere, davide, lldb-commits, #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D60022

llvm-svn: 357420
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py [new file with mode: 0644]
lldb/source/Target/Process.cpp