我想在模擬器shell中運行一個使用gdb的應用程序。我用下面的命令gdb沒有啓動應用程序
gdb <path of exe>
但是,應用程序不啓動,我得到以下錯誤
Starting program: <path of exe>
[Thread debugging using libthread_db enabled]
Program exited normally.
然而,當我附上一個正在運行的進程廣發行,它工作正常。
gdb -pid <process_id>
可能是什麼原因?
****<Update>****
On Employed Russian's advice, I did these steps
(gdb) b _start
Breakpoint 1 at 0xb40
(gdb) b main
Breakpoint 2 at 0xc43
(gdb) catch syscall exit
Catchpoint 3 (syscall 'exit' [1])
(gdb) catch syscall exit_group
Catchpoint 4 (syscall 'exit_group' [252])
(gdb) r
Starting program: <Exe Path>
[Thread debugging using libthread_db enabled]
Breakpoint 1, 0x80000b40 in _start()
(gdb) c
Continuing.
Breakpoint 2, 0x80000c43 in main()
(gdb) c
Continuing.
Catchpoint 4 (call to syscall 'exit_group'), 0xb7fe1424 in __kernel_vsyscall
()
(gdb) c
Continuing.
Program exited normally.
(gdb)
是什麼捕獲點4(調用系統調用 'exit_group')在__kernel_vsyscall ,0xb7fe1424這意味着什麼?
我進一步探討,我發現這個
Single stepping until exit from function main,
which has no line number information.
__libc_start_main (main=0xb6deb030 <main>, argc=1, ubp_av=0xbffffce4,
init=0x80037ab0 <__libc_csu_init>, fini=0x80037b10 <__libc_csu_fini>,
rtld_fini=0xb7ff1000 <_dl_fini>, stack_end=0xbffffcdc) at libc-start.c:258
258 libc-start.c: No such file or directory.
in libc-start.c
然而,libc.so是現在和我已經出口也使用
export LD_LIBRARY=$LD_LIBRARY:/lib
爲什麼沒有加載它的路徑?
你能告訴一些關於你的'可執行文件'(庫鏈接到...)嗎?什麼是操作系統? – devnull 2013-04-10 08:56:45
它鏈接到我自己的共享libs.Trying在Linux上 – Yogi 2013-04-10 08:59:31
這些共享庫鏈接到系統上的其他庫?哪個? – devnull 2013-04-10 09:02:55