Re: Debug code in data section in gdb

Andreas Schwab
2004-06-22T20:43:24Z

Tao Zhang <zhangtao@cc.gatech.edu> writes:

> 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.

Please define "doesn't work". What are the symptoms?

> So break *0x12344657 should work?

Yes. GDB does not distinguish between "code" and "data" section when
placing a breakpoint, it's all just memory.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃŸe 5, 90409 NÃ¼rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."