This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Program terminated by SIGTRAP in gdb
I think is because your libpthread is stripped. Maybe you can check
it and make sure it's not stripped.
On Thu, Jan 15, 2009 at 08:37, Albert Fu <quarkverse@gmail.com> wrote:
> Hi,
>
> I am new to debug a multi-thread program in gdb on my target.
>
> The program is terminated when it calls sem_wait().
> I browsed the gdb mailing list and didn't find an answer to my problem.
>
> ######################
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x0fe2ba28 in sigsuspend () from /lib/libc.so.6
> (gdb) bt
> #0 0x0fe2ba28 in sigsuspend () from /lib/libc.so.6
> #1 0x0fd91094 in pthread_getconcurrency () from /lib/libpthread.so.0
> #2 0x0fd920f0 in sem_wait () from /lib/libpthread.so.0
> #3 0x10016428 in main (argc=2, argv=0x7ffffdf4) at main.c:7361
> (gdb) info threads
> (gdb) info sharedlibrary
> From To Syms Read Shared Object Library
> 0x0fe15aa0 0x0ff1dd20 Yes /lib/libc.so.6
> 0x0fd8d0c0 0x0fd95d2c Yes /lib/libpthread.so.0
> 0x30001f60 0x30013980 Yes /lib/ld.so.1
> 0x0fd6006c 0x0fd67a6c No /lib/libnss_files.so.2
> (gdb)
> ######################
>
> Could you tell me why the program is supspended? Is the problem
> in the C library?
>
> I would really appreciate it if anyone could give me some advices.
>
> Thanks.
>
> Best regards,
>
> Albert
>