This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Debug code in data section in gdb
- From: Tao Zhang <zhangtao at cc dot gatech dot edu>
- To: gdb at sources dot redhat dot com
- Date: Tue, 22 Jun 2004 13:36:32 -0400 (EDT)
- Subject: Debug code in data section in gdb
Hi,
I have to copy a piece of code to a buffer in data section then execute
the code. I need to debug the code in the buffer to capture the problem
due to the copying of the code. I tried to use gdb to set breakpoints in
the code buffer (in data section) but it doesn't work. There is no OS at all,
so OS won't prevent the execution of something in data section. Is there a
way to ask gdb to set break points at data section? Or is there some other
work around?
Thanks so much
Tao
-Tao Zhang (zhangtao@cc.gatech.edu)