This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

breakpoints/2431: function call on command line terminates with SIGTRAP


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]