Closed jstaursky closed 5 years ago
I'll look into .write, but I can answer the vdso/vvar stuff now:
So uh, apparently I forgot to implement the ui code to convert command lines into ptrace write calls three years ago and you're the first person to notice.... wups!
I'll get on that, thanks for letting me know.
No problem, thanks for the cool tool!
BTW will .write
support cmds piped in?
Would be nice to do something like
.write 0xff8aa000 <((){objcopy -O binary -j .text `which less` $1; cat $1 } =(touch -c .))
with zsh
It would probably easier to implement .writef <addr> <file with bytes to write to memory>
.write
will not support shell commands but a .writef
is a possibility.
Originally I had planned on adding command line options to add other files to the initial generated elf, so you could do something like rappel --map 0x41410000 --file foo.bin
and in your resulting session you'd have the contents there, but I never got around to it and unless I have a pressing need, I doubt I will. If someone wants to add this though, feel free, though the ELF generation code is kinda hairy...
Say I'm in an interactive session and run
.showmap
which returns the followingWhy doesn't
.write 0xff8aa000 0x7f
and then reading it.read 0xff8ea000 0x1
show7f
?If I instead do
mov dword [0xff8aa000], 0x7f
and follow up with.read 0xff8ea000 0x1
it does show that7f
has been written.P.S. What does
[vvar]
and[vdso]
mean?