login
Header Space

 
 

how gdb modifies other processe's address space (say for an example setting breakpoint or modifying a variables value)

July 20, 2008 - 12:53pm
Submitted by Anonymous on July 20, 2008 - 12:53pm.
Linux

how does gdb puts "int 3" instruction into another process address space.
=> what I know it does not use ptrace for that.
=> what I know it uses bfd library for that.
=> what I am failing to understand is : by which mean it accesses other's process address space becuase ? (that also knowing only instruction's virtual address to be replaced).
please try to explain in detail in terms of implementation.

orly

July 21, 2008 - 5:46am
Anonymous (not verified)

Apparently you know nothing.
It *does* use ptrace to do *just that*, specifically PTRACE_POKETEXT. libbfd is not used for this either because, surprise surprise, putting an int3 instruction (what for?) into someone else's memory does not involve playing with object file formats.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary