This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]