no0neknow
no0neknow

Reputation: 87

Gdb step through assembly output of objdump from C compiled

I have a binary executable compiled by gcc on an IA32. It was originally coded in C. I would like to be able to step through and debug it. I can run objdump and shovel that to a file to read.

objdump -d mybinary > mytext.txt

I would like to be able to step through the assembly lines that I can see through objdump. I have used gdb a little bit and I would like to be able to run gdb on the output of an objdump. Is this possible or is there a good way to do this? What I'm thinking in my head is trying to do the following which obviously doesn't work.

objdump -d mybinary > gdb

Can someone point me in the right direction or show me how to get my binary in a form where I can use it with gdb?

Upvotes: 1

Views: 1838

Answers (1)

Employed Russian
Employed Russian

Reputation: 213957

I would like to be able to run gdb on the output of an objdump

That request makes no sense whatsoever.

What you are probably asking is "can I single-step in GDB, one instruction at a time?", in which case the answer is yes: use stepi command.

Upvotes: 4

Related Questions