public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: dicks@altium.nl
To: gdb-gnats@sources.redhat.com
Subject: breakpoints/2431: function call on command line terminates with SIGTRAP
Date: Fri, 14 Mar 2008 14:08:00 -0000	[thread overview]
Message-ID: <20080314140346.12979.qmail@sourceware.org> (raw)


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


             reply	other threads:[~2008-03-14 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 14:08 dicks [this message]
2008-03-17 16:18 Dick Streefland
2008-03-17 16:38 Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080314140346.12979.qmail@sourceware.org \
    --to=dicks@altium.nl \
    --cc=gdb-gnats@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).