在 gdb 中切换到汇编 [英] Switching to assembly in gdb
本文介绍了在 gdb 中切换到汇编的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 gdb 中调试 C 或 C++ 程序时,是否有任何方法可以切换到汇编?(假设所有源文件及其对应的汇编文件都可用)
Is there is any way to switch to assembly when debugging a C or C++ program in gdb ? (Given that all source files and their corresponding assembly files are available)
推荐答案
有一种方法可以反汇编一个函数或某段代码,是你想要的吗?
There is a way to disassemble a function or a certain section of code, is that what you are after?
执行此操作的命令是 disassemble <function name>
或内存位置.
The command to do so would be disassemble <function name>
or a memory location.
你指的是这个吗?
(gdb) help disassemble
Disassemble a specified section of memory.
Default is the function surrounding the pc of the selected frame.
With a single argument, the function surrounding that address is dumped.
Two arguments are taken as a range of memory to dump.
这篇关于在 gdb 中切换到汇编的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文