public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.24.3: unexpected SIGTRAP in gdb
@ 2008-03-17 16:53 Dick Streefland
  0 siblings, 0 replies; only message in thread
From: Dick Streefland @ 2008-03-17 16:53 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-17 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 16:53 2.6.24.3: unexpected SIGTRAP in gdb Dick Streefland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox