delorie.com/djgpp/doc/libc/libc_868.html
|
search
|
libc.a reference
write_child
Syntax
| #include <debug/dbgcom.h>
void write_child (unsigned child_addr, void *buf, unsigned len);
|
Description
This function transfers len bytes from the buffer pointed to by
buf in the debugger's data segment to the memory of the debugged
process starting at the address child_addr. It is used primarily
to insert a breakpoint instruction into the debugged process (to trigger
a trap when the debuggee's code gets to that point). The companion
function read_child
(see section read_child) is usually called before
write_child
to save the original code overwritten by the
breakpoint instruction.
Return Value
The function return zero if it has successfully transferred the data,
non-zero otherwise (e.g., if the address in child_addr is outside
the limits of the debuggee's code segment.
Portability