GDB not breaking at my breakpoints

Programming, for all ages and all languages.
Post Reply
User avatar
BMW
Member
Member
Posts: 286
Joined: Mon Nov 05, 2012 8:31 pm
Location: New Zealand

GDB not breaking at my breakpoints

Post 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...
Currently developing Lithium OS (LiOS).

Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
AndrewBuckley
Member
Member
Posts: 95
Joined: Thu Jan 29, 2009 9:13 am

Re: GDB not breaking at my breakpoints

Post by AndrewBuckley »

try hbreak instead of break. not sure why it does this but if i remember correctly thats how i made it work.
Post Reply