Can't debug my xlib changes because gdb gets SIGTRAP in __sigsuspend via _Jv_ThreadWait

Scott Gilbertson scottg@mantatest.com
Fri Nov 29 13:32:00 GMT 2002


I'm trying to debug my xlib changes, but the debugger is not giving me the
effect I'm looking for.

With my .gdbinit settings, I can load and run my program just fine in gdb.
If I set a breakpoint, however, the thing always gets a SIGTRAP in
__sigsuspend.  If I continue, the program is apparently running, but all
messed up (no graphics, and my breakpoint is never reached).  If I run with
no breakpoints, interrupt, set a breakpoint then continue, I get the same
problem.

Any idea what's going on and/or how to get the debugger to work?
-------------------------------------
My Configuration:
Linux version 2.4.18-14 (bhcompile@stripples.devel.redhat.com) (gcc version
3.2
20020903 (Red Hat Linux 8.0 3.2-7)) #1 Wed Sep 4 13:35:50 EDT 2002
/lib/libc-2.2.93.so
gcc (GCC) 3.2.1
cpu: Pentium 4
-------------------------------------
My .gdbinit:
handle SIGPWR nostop noprint
handle SIGXCPU nostop noprint
handle SIG32 nostop noprint
-------------------------------------
Transcript of typical debug session:
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) set args PC SILENT
(gdb) break XFillPolygon
Breakpoint 1 at 0x8051c16
(gdb) run
Starting program: /home/scott/mts5000/java/mts5000.bin PC SILENT

Program received signal SIGTRAP, Trace/breakpoint trap.
0x081852e8 in __sigsuspend (set=0xbffff740) at
../sysdeps/unix/sysv/linux/sigsuspend.c:55
55        CHECK_SIGSET (set), _NSIG / 8);
(gdb) bt
#0  0x081852e8 in __sigsuspend (set=0xbffff740) at
../sysdeps/unix/sysv/linux/sigsuspend.c:55
#1  0x08171e18 in __pthread_wait_for_restart_signal (self=0x82e1de0) at
pthread.c:1161
#2  0x0816efba in pthread_cond_wait (cond=0x0, mutex=0x83ac7c8) at
restart.h:36
#3  0x08121d76 in _Jv_ThreadWait() () at
../../../gcc/libjava/posix-threads.cc:435
#4  0x080ba555 in _Jv_RunMain(java::lang::Class*, char const*, int, char
const**, bool) (
    klass=0x8297880, name=0x0, argc=3, argv=0x8446f60, is_jar=false)
    at ../../../gcc/libjava/prims.cc:1011
#5  0x080ba640 in JvRunMain (klass=0x8297880, argc=3, argv=0xbffff944)
    at ../../../gcc/libjava/prims.cc:1020
#6  0x080481fd in main (argc=3, argv=0xbffff944) at Mainmain.i:12
#7  0x08177eab in __libc_start_main (main=0x80481d0 <main>, argc=3,
ubp_av=0xbffff944,
    init=0x80480b4 <_init>, fini=0x81ce961 <_fini>, rtld_fini=0,
stack_end=0xfffffffc)
    at ../sysdeps/generic/libc-start.c:140




More information about the Java mailing list