Subject: Re: gdb
To: None <snoonan@psudodragon.tbearsiberians.com>
From: felix zaslavskiy <felix@students.poly.edu>
List: current-users
Date: 06/11/2003 20:35:06
So this makes at least two people for who gdb dont work with threads on
i386. gdb has a way of not working after the first break for programs
when linked against pthread.

John Gordon produced a patch that worked for him on PowerPC but his
patch causing segfaults on my machine.(check archives )

Well as an alternative if you need to threads there is a program in
libpthread directoray called debuglog , it dont get compiled on install
but you can compile it manualy.  Just start the program in one console
with the -f flag then before you run your program set PTHREAD_DEBUGLOG
environment variable and you should see all sorts of traceoutput from
the libpthread library.


On Wed, 2003-06-11 at 19:57, snoonan@psudodragon.tbearsiberians.com
wrote:
> I just finished building current today
> NetBSD psudodragon 1.6T NetBSD 1.6T (PSUDODRAGON_APM) #1: Wed Jun 11 13:26:18 PDT 2003  root@psudodragon:/usr/src/sys/arch/i386/compile/PSUDODRAGON_APM i386
> 
> 
> and did a make installworld.  Things are working (mostly) but when
> I went to use gdb I have the following problem:
> 
> GNU gdb 5.0nb1
> Copyright 2000 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--"netbsdelf"... Deprecated bfd_read called at /usr/src/gnu/dist/toolchain/gdb/dbxread.c line 2638 in elfstab_build_psymtabs
> Deprecated bfd_read called at /usr/src/gnu/dist/toolchain/gdb/dbxread.c line 976 in fill_symbuf
> 
> (gdb) b cf2pin_read
> Breakpoint 1 at 0x804af23: file cf2pin.c, line 20.
> (gdb) r
> Starting program: /1.6/usr/home/snoonan/ubicom/config2/data/sample/t2/../../../src/cf2 proj
> Breakpoint 1, cf2pin_read (doc=0x8052b80, list=0x808f4b0, cur=0x80afd40, 
> prefix=0x804bafb "", dev=0x808f4a0) at cf2pin.c:20
> 20        name =  xmlGetProp(cur, "name");
> (gdb) info threads 
> * 1 Thread 0 ()  cf2pin_read (doc=0x8052b80, list=0x808f4b0, cur=0x80afd40, 
>   prefix=0x804bafb "", dev=0x808f4a0) at cf2pin.c:20
> (gdb) n
> [New LWP 0]
> 
> < program output here>
> 
> Program exited normally.
> (gdb) 
> 
> 
> 
> Help, when ever I step in gdb now it does this 'New LWP 0' thing
> and runs until the program exits.  Did I not build something properly?
> I did a:
> ./build.sh -U -D /usr/i386build distribution install=/
> 
> Shelby
>