您如何看待汇编代码中出现分段错误的地方? [英] How do you see where in the assembly code a segmentation fault occurs?
本文介绍了您如何看待汇编代码中出现分段错误的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有一个gdb命令,它将向您显示.s文件中的哪一行导致seg错误,但我不记得它是什么并且无法找到它.谢谢.
I know there is a gdb command that will show you which line in the .s file caused the seg fault, but I can't remember what it is and haven't been able to find it. Thanks.
推荐答案
我知道有一个gdb命令,它将向您显示.s文件中的哪一行导致seg错误
I know there is a gdb command that will show you which line in the .s file caused the seg fault
没有.有一个 命令可以向您显示反汇编:
There is not. There is a command to show you disassembly:
(gdb) X/4i $pc
(gdb) disas $pc
这篇关于您如何看待汇编代码中出现分段错误的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文