c++ - GDB reports a crash but program runs fine -
i have programme when run terminal (wihtout gdb) prints outputs. assume output looks like
welcome cmp simulator initializing finish initialization run goodbye
now, when want utilize gdb, programme gives pid , utilize attach gdb. assume output of programme looks like
welcome cmp simulator gdb - 5932 (run command on terminal , type "continue" @ gdb prompt)
while programme waits sigcont, run gdb - 5932
on anther terminal. type "continue", gdb reports crash this:
loaded symbols /home/mahmood/results/temp/libcmp_iface_gcc.so 0x00007fd3a499fb7b in raise (sig=<optimized out>) @ ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42 42 ../nptl/sysdeps/unix/sysv/linux/pt-raise.c: no such file or directory. (gdb) c continuing. programme received signal sigstop, stopped (signal). [switching thread 0x7fd3a343f700 (lwp 21014)] 0x00007fd3a408e303 in __gi___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) @ ../sysdeps/unix/sysv/linux/poll.c:87 87 ../sysdeps/unix/sysv/linux/poll.c: no such file or directory. (gdb) bt #0 0x00007fd3a408e303 in __gi___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) @ ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007fd3a4c0fc4c in ?? () /home/mahmood/simics-3.0.31/amd64-linux/bin/libsimics-common.so #2 0x00007fd3a4997e9a in start_thread (arg=0x7fd3a343f700) @ pthread_create.c:308 #3 0x00007fd3a4099cbd in clone () @ ../sysdeps/unix/sysv/linux/x86_64/clone.s:112 #4 0x0000000000000000 in ?? () (gdb)
at point, programme still waiting sigcont.
what trace means? can see without gdb, programme prints more line on output. gdb shows crash. guess there problem creating thread.
any feedback appreciated.
update:
if ran "continue" again, see same output on gdb
(gdb) c continuing. programme received signal sigstop, stopped (signal). 0x00007f09b653c303 in __gi___poll (fds=<optimized out>, nfds=<optimized out>, timeout= <optimized out>) @ ../sysdeps/unix/sysv/linux/poll.c:87 87 in ../sysdeps/unix/sysv/linux/poll.c (gdb) bt #0 0x00007f09b653c303 in __gi___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) @ ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007f09b70bdc4c in ?? () /home/mahmood/simics-3.0.31/amd64-linux/bin/libsimics-common.so #2 0x00007f09b6e45e9a in start_thread (arg=0x7f09b58ed700) @ pthread_create.c:308 #3 0x00007f09b6547cbd in clone () @ ../sysdeps/unix/sysv/linux/x86_64/clone.s:112 #4 0x0000000000000000 in ?? () (gdb)
the scheme ubuntu 12.04 amd64
gdb isn't showing crash, sigstop means programme wasa stopped , have go on using gdb command 'continue' or asking gdb send signal using 'sig sigcont'
i hope help you.
c++ linux gdb
No comments:
Post a Comment