How to stop GDB displaying a disassembly?

1 post / 0 new
hypex
hypex's picture
Offline
Last seen: 4 months 4 weeks ago
Joined: 2011-09-09 16:20
How to stop GDB displaying a disassembly?

Hi guys. So I am resorting to doing some debugging in GDB. Since I wish to step through some machine code as I don't have the source. Otherwise I would be using DB101. :-)

So I refreshed myself with some tutorials on here and set out to debug. I loaded up the GDB console in a shell. And loaded the binary in with a file command. As there is no main() symbol I can break at I broke it at _start which worked fine. I am also able to single step.

The problem is I wish to see what PPC ASM is at the PC which GDB doesn't display by default for some reason. I used the disas command to display the ASM but GDB just kept running away line by line. I can't stop it and have to reset.

I tried to give it a window like $pc,$pc+0x20 but it just kept running. Seems for all the features it has you can't tell it to simply disassemble an X amount of instructions.

Is there a way to tell it to only list a section or to show the current instruction? I played around but it just kept going off the rails. It wouldn't stop!

I used to think MonAm was hard to work with but at least it has a full screen mode where it displays this infomation and key shortcuts. GDB could do with a full screen console mode. If only we had a GUI for GDB like XCode does on the Mac life would be easier. :-)