bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't debug multithreaded apps on mips-sgi-irix-6.5


From: Richard Tollerton
Subject: Can't debug multithreaded apps on mips-sgi-irix-6.5
Date: Mon, 18 Mar 2002 11:56:14 -0600

Environment: SGI Octane (MIPS R10K 64-bit mode) running IRIX 6.5; gcc
3.0.4 with gcc 2.95.3 tested previously. SGI development tools include the
MIPSPro 7.3 toolchain. gdb version is 5.1.1 with 5.0 used previously.

Description: Any multithreaded app cannot be debugged with gdb; it hangs
on application startup. I've tested this with my code (~7000-line Qt C++
app), somebody else's GLUT app, and this one-liner test case that doesn't 
even use threads:

$ cat > test.c
#include <stdio.h>
int main(void) { printf("hi!\n"); return 0; }
^D
$ gcc -o test test.c -lpthread
ld32: WARNING 84 : /usr/lib32/libpthread.so is not used for resolving any
symbol.
$ ./test
hi!
$ gdb test
GNU gdb 5.1.1
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 "mips-sgi-irix6.5"...
(gdb) run
Starting program: /usr/mvl1/tollert/test 
warning: Signal ? does not exist on this system.

< process hangs, doesn't respond to ^C >

^Z
Suspended
$ kill %1
[1]    Terminated             gdb test

So clearly this involves nothing more than linking -pthread. As I can't
seem to get a prompt out of gdb after I run the program, I don't know how
to get a stack trace. (I believe earlier versions of gdb/gcc were
interruptable with ^C but it will take considerable time for me to
recompile them.) As it stands after gdb is killed the debugged program is
pegged at 100% CPU usage but does respond to signals to kill it.

Any help appreciated.

______________
Rich Tollerton  <address@hidden>
                <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]