在 x86 上使用 GDB 而不调试符号? [英] Using GDB without debugging symbols on x86?

查看:30
本文介绍了在 x86 上使用 GDB 而不调试符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 GDB 调试在 32 位 x86 处理器上没有调试符号的程序?检查函数参数、局部变量、解析指针对于知道如何做很有用.其目的并不是真正将其用于逆向工程,因为我有时只是懒得安装调试符号,并且知道如何从 gdb 中获取一些基本信息会很棒.

How do I use GDB to debug a program which do not have debugging symbols on a 32-bit x86 processor? Inspecting the function arguments, local variables, resolving pointers would be useful to know how to do. The intention is not really to use this for reverse engineering, as I'm sometimes just too lazy to install the debugging symbols and would be great to know how to get some basic information out of gdb.

推荐答案

开始,你可以做;

gdb "whatever"
break __libc_start_main
r

这将在 libc 的 crt0 代码中设置一个断点,并允许您在 main 之前中断,即使目标二进制文件被完全剥离.

that will setup a breakpoint in libc's crt0 code and allow you to break before main, even if the target binary is totally stripped.

这将使您在大多数用户代码之前的断点处进入运行状态.然后,您可以随心所欲地单步执行、分解、转储内存等.

That will get you to a running state at a breakpoint before most user code. You can then single step, dissasemble, dump memory etc... to your heart's content.

这适用于所有平台,您询问 IA-32/x86 的事实并不重要.

This works on all platforms, the fact your asking about IA-32 / x86 does not matter.

这篇关于在 x86 上使用 GDB 而不调试符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆