Debug code in data section in gdb

Tao Zhang
Tue Jun 22 17:36:00 GMT 2004


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 Zhang (

More information about the Gdb mailing list