From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23831 invoked by alias); 14 Mar 2008 14:08:02 -0000 Received: (qmail 23809 invoked by uid 71); 14 Mar 2008 14:08:01 -0000 Resent-Date: 14 Mar 2008 14:08:01 -0000 Resent-Message-ID: <20080314140801.23808.qmail@sourceware.org> Resent-From: gdb-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: gdb-prs@sources.redhat.com Resent-Reply-To: gdb-gnats@sources.redhat.com, dicks@altium.nl Received: (qmail 12980 invoked by uid 48); 14 Mar 2008 14:03:46 -0000 Message-Id: <20080314140346.12979.qmail@sourceware.org> Date: Fri, 14 Mar 2008 14:08:00 -0000 From: dicks@altium.nl Reply-To: dicks@altium.nl To: gdb-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: breakpoints/2431: function call on command line terminates with SIGTRAP Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00104.txt.bz2 >Number: 2431 >Category: breakpoints >Synopsis: function call on command line terminates with SIGTRAP >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Mar 14 14:08:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: dicks@altium.nl >Release: GNU gdb 6.7.1-debian >Organization: >Environment: Linux kemi 2.6.24.3-x177 #1 SMP Tue Feb 26 14:27:40 CET 2008 i686 GNU/Linux gcc version 4.2.3 (Debian 4.2.3-2) This GDB was configured as "i486-linux-gnu". >Description: Since upgrading from Debian etch to lenny, gdb often stops with SIGTRAP in a function called from the commandline. This occurs both with gdb-6.4.90 from etch and gdb-6.7.1 from lenny, but only when running on the lenny system. It is not related to the gcc version or kernel version either. I suspect that it is related to library version differences between etch and lenny. >How-To-Repeat: $ cat > bug.c int x; int main(int argc, char* argv[]) { x++; return 0; } ^D $ cat > bug.gdb file bug b main r s p getpid() p getpid() q ^D $ gcc -g -o bug bug.c $ gdb -n -batch -x bug.gdb Using host libthread_db library "/lib/libthread_db.so.1". Breakpoint 1 at 0x80483d3: file bug.c, line 4. Breakpoint 1, main (argc=1, argv=0xbf95aec4) at bug.c:4 4 x++; 5 return 0; $1 = 15439 Program received signal SIGTRAP, Trace/breakpoint trap. 0xb7eba9c7 in getpid () from /lib/libc.so.6 /tmp/bug.gdb:6: Error in sourced command file: The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on" Evaluation of the expression containing the function (getpid) will be abandoned. >Fix: >Release-Note: >Audit-Trail: >Unformatted: