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