This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: working version of gdb(x86) and gdbserver(ppc)?
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?