From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21808 invoked by alias); 15 Jan 2009 00:37:58 -0000 Received: (qmail 21800 invoked by uid 22791); 15 Jan 2009 00:37:57 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f23.google.com (HELO mail-ew0-f23.google.com) (209.85.219.23) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jan 2009 00:37:12 +0000 Received: by ewy4 with SMTP id 4so273928ewy.0 for ; Wed, 14 Jan 2009 16:37:09 -0800 (PST) Received: by 10.210.90.10 with SMTP id n10mr866072ebb.173.1231979829498; Wed, 14 Jan 2009 16:37:09 -0800 (PST) Received: by 10.210.77.3 with HTTP; Wed, 14 Jan 2009 16:37:09 -0800 (PST) Message-ID: <966c7c700901141637g49f2bafcj6e95c60c80227eba@mail.gmail.com> Date: Thu, 15 Jan 2009 00:37:00 -0000 From: "Albert Fu" To: gdb@sourceware.org Subject: Program terminated by SIGTRAP in gdb MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/msg00071.txt.bz2 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