This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: SIGTRAP or SIG32 when remote debugging threads
On Monday 22 March 2004 15:22, Daniel Jacobowitz wrote:
> On Mon, Mar 22, 2004 at 09:47:46AM +0100, Lukas Heiniger wrote:
> > On Friday 19 March 2004 18:28, Daniel Jacobowitz wrote:
> > > On Fri, Mar 19, 2004 at 11:07:34AM +0100, Lukas Heiniger wrote:
> > > > I'm trying to do thread debugging on an arm7 target with a gdb 6.0
> > > > snapshot and gdbserver. I've been searching this list for two days
> > > > now but haven't found an answer to my problem.
> > >
> > > Have you set solib-absolute-prefix? It doesn't look like it.
> >
> > Thanks
> >
> > I do have set solib-absolute-prefix to .../target_fs
> >
> > where target_fs contains a copy of the target file system (including /lib
> > and /usr/lib ...)
> >
> > solib-search-path is not set, however. I tried various combinations with
> > solib-search-path and solib-absolute-prefix but still I always get
> >
> > Program received signal SIG32, Real-time event 32.
> > 0x40088534 in ?? ()
>
> You may have to debug GDB to find out why it is not loading shared
> libraries then.
Did that and it helped.
It seems that the problem was that I specified the inferior with 'symbol-file'
only. exec_bfd wasn't set then, and no libraries were loaded. Now I specify
the file with 'exec-file' or when starting gdb.
Besides that, some of the libraries in <solib-absolute-prefix>/lib were
stripped.
However some things are still suspicious if you look at my last session:
--
lheiniger@linux:/home/hynix/arm/bin> arm-linux-gdb /home/hynix/app
GNU gdb 20040318
Copyright 2004 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 "--host=i686-pc-linux-gnu --target=arm-linux"...
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x40002570 in ?? ()
(gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
(gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
(gdb) c
Continuing.
Program received signal SIG32, Real-time event 32.
0x40088534 in ?? ()
(gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
Reading symbols from /home/hynix/arm/arm-linux/lib/libm.so.6...done.
Loaded symbols for /home/hynix/arm/arm-linux/lib/libm.so.6
Reading symbols from /home/hynix/arm/arm-linux/lib/libpthread.so.0...done.
Loaded symbols for /home/hynix/arm/arm-linux/lib/libpthread.so.0
Reading symbols from /home/hynix/arm/arm-linux/lib/libc.so.6...done.
Loaded symbols for /home/hynix/arm/arm-linux/lib/libc.so.6
Reading symbols from /home/hynix/arm/arm-linux/lib/ld-linux.so.2...done.
Loaded symbols for /home/hynix/arm/arm-linux/lib/ld-linux.so.2
(gdb) i threads
3 Thread 1026 0x400e1ee4 in getegid () from /home/hynix/arm/arm-linux/lib/
libc.so.6
2 Thread 2049 0x400fa7b8 in tcsetattr (fd=1, optional_actions=1,
termios_p=0x0) at ../sysdeps/unix/sysv/linux/tcsetattr.c:92
1 Thread 1024 0x40088534 in __sigsuspend (set=0xbffffc6c) at ../sysdeps/
unix/sysv/linux/sigsuspend.c:54
(gdb) l vcif_RxThread
...
(gdb) b 712
Breakpoint 1 at 0x201fc30: file ASFINAG/vcif/src/vcif.c, line 712.
(gdb) c
Continuing.
[New Thread 8201]
[Switching to Thread 8201]
Breakpoint 1, vcif_RxThread (Dummy=0x0) at vcif.c:712
712 BytesRead = read(s_UartDevice, Buf, READ_SIZE);
(gdb)
--
1. Why does gdb wait with loading the libraries until I 'set
solib-absolute-prefix...' after the first SIG32 instead of loading them in
the first place?
2. The files referenced in threads 2 and 1 seem to be host files. They are not
part of the target filesys.
I had a breakpoint in solib_open and every library that was loaded seemed to
be available in the path set with 'solib-absolute-prefix'. Why does it still
refer to host files?
Any Ideas?
Thanks
Lukas Heiniger