Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Albert Ho <alberth@intellambda.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: working version of gdb(x86) and gdbserver(ppc)?
Date: Fri, 20 Feb 2004 01:06:00 -0000	[thread overview]
Message-ID: <40355DA5.7070803@intellambda.com> (raw)
In-Reply-To: <20040219232439.GB472@nevyn.them.org>

OK. I made the gdb(x86) to gdbserver(x86) working on stock RH9 box. I am 
posting the finding in case other people may find it useful. Special 
thanks to Daniel pointing to the correct direction.

To disable the *&^# NPTL in RH9, tell the application that it is running 
in an old kernel which uses linux thread.

$ export LD_ASSUME_KERNEL=2.4.1
$ gdbserver :5555 foo

On the host, it seems the above step is not needed. gdb can talk to 
gdbserver.
Stop on break point, examine vars, and continue shows no problem.
But step spits out some error and the target continue without informing 
the host.
That is not a major problem given one can set break point at the next stop.

(gdb) c
Continuing.
Reading symbols from /lib/i686/libpthread.so.0...
done.
Reading symbols from /lib/i686/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
[New Thread 16384]
[New Thread 49156]
[Switching to Thread 49156]
 
Breakpoint 1, thread1 (arg=0x0) at ../foo.c:43
43              if ( bogus() != REALLY_BOGUS ) {
(gdb) n
Incomplete CFI data; unspecified registers at 0x080496ba...Incomplete 
CFI data; unspecified registers at 0x080496ba...Incomplete CFI data; 
unspecified registers at 0x080496ba...Incomplete CFI data; unspecified 
registers at 0x080496ba...Incomplete CFI data; unspecified registers at 
0x080496ba...Incomplete CFI data; unspecified registers at 
0x080496ba...Incomplete CFI data;
unspecified registers at 0x080496ba...Reading in symbols for 
../foo2.c...no terminating 0-type entry for macros in `.debug_macinfo' 
section...done.
Incomplete CFI data; unspecified registers at 0x08049f21...Incomplete 
CFI data; unspecified registers at 0x08049f21...Incomplete CFI data; 
unspecified registers at 0x08049f21...Reading in symbols for __kill...done.
[Switching to Thread 16384]
0x400ac5f9 in sigsuspend () from /lib/i686/libc.so.6


Daniel Jacobowitz wrote:

>On Thu, Feb 19, 2004 at 03:23:23PM -0800, Albert Ho wrote:
>
>>Thanks Daniel.
>>One more question: do strace suppose to show exactly the same library 
>>opened?
>>I notice gdb open("/lib/tls/libthread_db.so.1", O_RDONLY) = 3
>>but gdbserver open("/lib/tls/libpthread.so.0", O_RDONLY) = 9
>>
>
>Why is gdbserver opening libpthread at all?
>
>



      parent reply	other threads:[~2004-02-20  1:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19 22:21 Albert Ho
2004-02-19 23:05 ` Daniel Jacobowitz
2004-02-19 23:23   ` Albert Ho
2004-02-19 23:24     ` Daniel Jacobowitz
2004-02-20  0:52       ` Albert Ho
2004-02-20  1:06       ` Albert Ho [this message]

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=40355DA5.7070803@intellambda.com \
    --to=alberth@intellambda.com \
    --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