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: Tao Zhang <zhangtao at cc dot gatech dot edu>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 22 Jun 2004 15:10:48 -0400 (EDT)
- Subject: Re: Debug code in data section in gdb
- References: <20040622181936.BF6E14B104@berman.michael-chastain.com>
Hi, Michael
I tried that many times, it doesn't work for me. I even played some trick
so that the code buffer is actually placed in code section now. It still
doesn't work. I am very confused. The breakpoints work just fine for other
code.
So break *0x12344657 should work? Then maybe it is the problem of my gdb
port rather than general gdb?
Thanks a lot
Tao
-Tao Zhang (zhangtao@cc.gatech.edu)
On Tue, 22 Jun 2004, Michael Elizabeth Chastain wrote:
> > Is there a way to ask gdb to set break points at data section?
> > Or is there some other work around?
>
> If you know the exact address where you want to set the breakpoint,
> you can do:
>
> (gdb) break *0x12345678
>
> Be sure to do this after you've copied your code into the data
> section, not before.
>
> Michael C
>