This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Debug code in data section in gdb
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: mec dot gnu at mindspring dot com, zhangtao at cc dot gatech dot edu
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 22 Jun 2004 17:05:56 -0400 (EDT)
- Subject: Re: Debug code in data section in gdb
Hi Tao,
It sounds like, perhaps, you are placing the breakpoint first,
and then copying the code on top of the location of the breakpoint.
The way gdb sets breakpoints (usually) is that gdb writes a BREAKPOINT
instruction into the memory at the address indicated. So if you
set a breakpoint first, then overwrite that memory with your own
contents, then you will overwrite the BREAKPOINT instruction and
lose it.
Can you capture a complete gdb session with the 'script' command
and mail it in?
Michael C
GDB QA Guy