3
产卵壳我有一个庞大的代码这个C函数:无法用gdb
void test() {
char *arg[] = {"/bin/sh", 0};
execve("/bin/sh", arg, 0);
}
我试图用gdb
(gdb) call test() process 1948 is executing new program: /bin/dash warning: Selected architecture i386:x86-64 is not compatible with reported target architecture i386 Architecture of file not recognized. An error occurred while in a function called from GDB. Evaluation of the expression containing the function (test) will be abandoned. When the function is done executing, GDB will silently stop.
因此,外壳不产卵调试代码。如何去做呢?
你正在使用哪个版本的gdb? – Hasturkun 2013-03-11 16:04:04
GNU gdb(Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1)7.4-2012.04 – leet 2013-03-11 16:05:01
如果在没有gdb的情况下运行,它会启动shell吗? – teppic 2013-03-11 16:07:40