diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-18 15:07:39 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-18 15:07:39 +0300 |
commit | 82eb10b0c7ae9382a4bbc97071c74de9055ad56e (patch) | |
tree | 06054053835f3ce37b01c7da8bba4638986a4727 /src/mem/io-ptrace.c | |
parent | a939c762524f6bc6da41a5ebce0f83617d6267a5 (diff) |
Nicer cli interface
Remove some behaviour that isn't clear to user, such as if no offset
argument is given, write uses the map offsets from regions to write data
from file starting from the region's map offset!
now write is explicit and does exactly what you would expect.
map is provided for remapping regions, that is providing file (such as
shared library usually), and it will write contents of it starting from
the region map offset for each given region.
Assuming maps has this line:
`7f392b87e000-7f392b8b9000 r-xp 00017000 08:01 133842 /usr/lib/libncursesw.so.6.1`
And we do this:
`proc-region-rw <pid> write /usr/lib/libncursesw.so << maps`
The contents of /usr/lib/libncursesw.so would be written to 7f392b87e000-7f392b8b9000
(This will most likely cause htop to crash)
Now if we do this instead:
`proc-region-rw <pid> map /usr/lib/libncursesw.so << maps`
The contents of /usr/lib/libncursesw.so _starting from offset 000170000_
would be written to 7f392b87e000-7f392b8b9000. Notice the difference,
map function uses the offset information from region, to write contents
from the input file, starting from the offset in the region.
(This should not crash htop.)
Diffstat (limited to 'src/mem/io-ptrace.c')
0 files changed, 0 insertions, 0 deletions