Page 1 of 1

GDB not breaking at my breakpoints

Posted: Tue Jan 22, 2013 9:26 pm
by BMW
I am debugging a flat binary (made in NASM), so I also compile it to elf for the debugging symbols. I attach GDB to QEMU, then do the command "symbol-file <elf file>" to load the debug symbols from the elf version I compiled. Then I set a breakpoint, and GDB says it has successfully set it. I run the command "continue" in GDB and execution continues but it does not break when the breakpoint is executed....

When I compile my assembly code, I have to remove the "org" instruction at the top before I can compile to ELF... maybe this has something to do with it...

Re: GDB not breaking at my breakpoints

Posted: Tue Jan 22, 2013 10:07 pm
by AndrewBuckley
try hbreak instead of break. not sure why it does this but if i remember correctly thats how i made it work.