Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Lukas Heiniger <lukas.heiniger@fela.ch>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: SIGTRAP or SIG32 when remote debugging threads
Date: Tue, 23 Mar 2004 19:25:00 -0000	[thread overview]
Message-ID: <200403231755.46001.lukas.heiniger@fela.ch> (raw)
In-Reply-To: <20040322142216.GA19284@nevyn.them.org>

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


  reply	other threads:[~2004-03-23 16:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 17:30 Lukas Heiniger
2004-03-19 18:31 ` Daniel Jacobowitz
2004-03-22 13:21   ` Lukas Heiniger
2004-03-22 17:33     ` Daniel Jacobowitz
2004-03-23 19:25       ` Lukas Heiniger [this message]
2004-03-23 20:41         ` Daniel Jacobowitz
2004-03-24 14:44           ` Lukas Heiniger
2004-03-24 14:54             ` Daniel Jacobowitz
2004-03-24 15:09               ` Lukas Heiniger
2004-03-24 15:44                 ` Daniel Jacobowitz
2004-03-25 14:29                   ` Lukas Heiniger
2004-03-25 15:37                     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200403231755.46001.lukas.heiniger@fela.ch \
    --to=lukas.heiniger@fela.ch \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox