public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: spam@altium.nl (Dick Streefland)
To: linux-kernel@vger.kernel.org
Subject: 2.6.24.3: unexpected SIGTRAP in gdb
Date: Mon, 17 Mar 2008 16:53:37 -0000	[thread overview]
Message-ID: <5ad2.47dea211.2cd38@altium.nl> (raw)

With kernel version 2.6.24.3, I sometimes get an unexpected SIGTRAP
signal during the evaluation of a function call on the gdb command
line. This problem does not occur with kernel version 2.6.23.12
running on the same machine. Both gdb-6.4.90 and gdb-6.7.1 exhibit
this behavior.

I can reproduce the problem as follows:

$ cat > bug.c
int x;
int foo(void)
{
	return 42;
}
int main(int argc, char* argv[])
{
	x++;
	return 0;
}
^D
$ cat > bug.gdb
b main
r
s
p foo()
p foo()
^D
$ gcc -static -g -o bug bug.c
$ gdb -n -batch -x bug.gdb bug
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Breakpoint 1 at 0x8048200: file bug.c, line 8.

Breakpoint 1, main () at bug.c:8
8               x++;
9               return 0;
$1 = 42

Program received signal SIGTRAP, Trace/breakpoint trap.
0x080481e9 in foo () at bug.c:3
3       {
/tmp/bug.gdb:5: 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 (foo) will be abandoned.

-- 
Dick Streefland                      ////                      Altium BV
dick.streefland@altium.nl           (@ @)          http://www.altium.com
--------------------------------oOO--(_)--OOo---------------------------


                 reply	other threads:[~2008-03-17 17:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5ad2.47dea211.2cd38@altium.nl \
    --to=spam@altium.nl \
    --cc=dick.streefland@altium.nl \
    --cc=linux-kernel@vger.kernel.org \
    /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