Debug code in data section in gdb

Tao Zhang
2004-06-22T17:36:35Z

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)