简体   繁体   English

Gdb逐步完成从C编译的objdump的汇编输出

[英]Gdb step through assembly output of objdump from C compiled

I have a binary executable compiled by gcc on an IA32. 我在IA32上有一个由gcc编译的二进制可执行文件。 It was originally coded in C. I would like to be able to step through and debug it. 它最初用C编码。我希望能够逐步调试它。 I can run objdump and shovel that to a file to read. 我可以运行objdump并将其铲到一个文件中来阅读。

objdump -d mybinary > mytext.txt

I would like to be able to step through the assembly lines that I can see through objdump. 我希望能够通过objdump逐步完成装配线。 I have used gdb a little bit and I would like to be able to run gdb on the output of an objdump. 我已经使用了一点gdb,我希望能够在objdump的输出上运行gdb。 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? 有人可以指出我正确的方向或告诉我如何在我可以使用gdb的形式获取我的二进制文件?

I would like to be able to run gdb on the output of an objdump 我希望能够在objdump的输出上运行gdb

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. 您可能会问的是“我可以单步执行GDB,一次只能执行一条指令吗?”,在这种情况下答案是肯定的:使用stepi命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM