From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14516 invoked by alias); 15 Jan 2009 02:08:07 -0000 Received: (qmail 14504 invoked by uid 22791); 15 Jan 2009 02:08:06 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.188) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jan 2009 02:07:30 +0000 Received: by ti-out-0910.google.com with SMTP id d10so483156tib.12 for ; Wed, 14 Jan 2009 18:07:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.110.43.16 with SMTP id q16mr1034525tiq.7.1231985247902; Wed, 14 Jan 2009 18:07:27 -0800 (PST) In-Reply-To: <966c7c700901141637g49f2bafcj6e95c60c80227eba@mail.gmail.com> References: <966c7c700901141637g49f2bafcj6e95c60c80227eba@mail.gmail.com> Date: Thu, 15 Jan 2009 02:08:00 -0000 Message-ID: Subject: Re: Program terminated by SIGTRAP in gdb From: teawater To: Albert Fu Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00072.txt.bz2 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 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 >