Link to home
Start Free TrialLog in
Avatar of Linky
Linky

asked on

Some GDB help please

I have a command prompt program that I want to step through, step by step and be able to see whats in each register. Is there a simple way to do this without the source and without setting a breakpoint? I'd like to see each assembly line too.

I remember I knew how to do it back a few semesters ago, now I need help.
SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Linky
Linky

ASKER

I get "No Frame selected." when I do "disassemble". Step and next it says, "The program is not being run."
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
objdump does not shows the source code in assembly. It shows only the source file names, functions names (mangled /demangled ones ).
(gdb) stop in main
will halt the program at the very first line of main.
(gdb) stepi
will go to next instruction in assembly code.
stepi stands for step instruction.