I am trying to run a app using gdb in emulator shell. I use following command
gdb <path of exe>
However, The app does not launch and I get following error
Starting program: <path of exe> [Thread debugging using libthread_db enabled] Program exited normally.
However, when I attach a running process to gdb, it works fine.
gdb -pid <process_id>
What could be the reason?
(gdb) b _start Breakpoint 1 at 0xb40 (gdb) b main Breakpoint 2 at 0xc43 (gdb) catch syscall exit Catchpoint 3 (syscall 'exit' ) (gdb) catch syscall exit_group Catchpoint 4 (syscall 'exit_group' ) (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)
What does Catchpoint 4 (call to syscall 'exit_group'), 0xb7fe1424 in __kernel_vsyscall this mean? I probed further and i found this
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
However, libc.so is present and i have exported its path also using
Why is not loading?