* working version of gdb(x86) and gdbserver(ppc)?
@ 2004-02-19 22:21 Albert Ho
2004-02-19 23:05 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Albert Ho @ 2004-02-19 22:21 UTC (permalink / raw)
To: gdb
Hi,
I wonder if anyone out there can share their remote debugging setup
config that works.
The host is x86(P4).
The target is ppc(8270).
Info from kernel version, gcc version, libc version, pthread library
version is appreciated.
I tried to have gdb and gdbserver between 2 identical machine(RH9,
x86) without luck.
Same result as with RH9's gdb and gdb 6.0 pulled from
www.gnu.org/software/gdb.
==============gdbserver================
[root@pc19 bin]# ./gdbserver :5000 foo
Process foo created; pid = 4963
Remote debugging from host 192.168.0.50
Cannot find new threads: generic error
Cannot find new threads: generic error
Cannot find new threads: generic error
Child terminated with signal = 5
Child terminated with signal = 0x0
GDBserver exiting
==========================gdb==========================
(gdb) c
Continuing.
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb)
========================================================
Then I looked into the gdb archive, played around with the
solib-absolute-path.
Not much difference there. I even strace the lib opened by gdbserver and
gdb.
They open different libraries. Do they suppose to open the same shared lib?
gdbserver:
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/tls/libthread_db.so.1", O_RDONLY) = 3
^^^^^^^^^^^^^^^^^
open("/lib/tls/libc.so.6", O_RDONLY) = 3
gdb:
open("/lib/tls/libpthread.so.0", O_RDONLY) = 3
open("/lib/tls/libc.so.6", O_RDONLY) = 7
open("/lib/ld-linux.so.2", O_RDONLY) = 8
open("/lib/tls/libpthread.so.0", O_RDONLY) = 9
^^^^^^^^^^^^^^^
open("/lib/tls/libpthread-0.26.so.debug", O_RDONLY) = -1 ENOENT (No such
file or directory)
Thanks
Albert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: working version of gdb(x86) and gdbserver(ppc)?
2004-02-19 22:21 working version of gdb(x86) and gdbserver(ppc)? Albert Ho
@ 2004-02-19 23:05 ` Daniel Jacobowitz
2004-02-19 23:23 ` Albert Ho
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-02-19 23:05 UTC (permalink / raw)
To: Albert Ho; +Cc: gdb
On Thu, Feb 19, 2004 at 12:47:09PM -0800, Albert Ho wrote:
> Hi,
> I wonder if anyone out there can share their remote debugging setup
> config that works.
> The host is x86(P4).
> The target is ppc(8270).
> Info from kernel version, gcc version, libc version, pthread library
> version is appreciated.
>
> I tried to have gdb and gdbserver between 2 identical machine(RH9,
> x86) without luck.
> Same result as with RH9's gdb and gdb 6.0 pulled from
> www.gnu.org/software/gdb.
The problem you are seeing on RH9 is the fact that gdbserver does not
yet support NPTL. That probably will not affect your PPC 8270 setup.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: working version of gdb(x86) and gdbserver(ppc)?
2004-02-19 23:05 ` Daniel Jacobowitz
@ 2004-02-19 23:23 ` Albert Ho
2004-02-19 23:24 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Albert Ho @ 2004-02-19 23:23 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
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
Daniel Jacobowitz wrote:
>On Thu, Feb 19, 2004 at 12:47:09PM -0800, Albert Ho wrote:
>
>
>>Hi,
>> I wonder if anyone out there can share their remote debugging setup
>>config that works.
>>The host is x86(P4).
>>The target is ppc(8270).
>> Info from kernel version, gcc version, libc version, pthread library
>>version is appreciated.
>>
>> I tried to have gdb and gdbserver between 2 identical machine(RH9,
>>x86) without luck.
>>Same result as with RH9's gdb and gdb 6.0 pulled from
>>www.gnu.org/software/gdb.
>>
>>
>
>The problem you are seeing on RH9 is the fact that gdbserver does not
>yet support NPTL. That probably will not affect your PPC 8270 setup.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: working version of gdb(x86) and gdbserver(ppc)?
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
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-02-19 23:24 UTC (permalink / raw)
To: Albert Ho; +Cc: gdb
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?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: working version of gdb(x86) and gdbserver(ppc)?
2004-02-19 23:24 ` Daniel Jacobowitz
@ 2004-02-20 0:52 ` Albert Ho
2004-02-20 1:06 ` Albert Ho
1 sibling, 0 replies; 6+ messages in thread
From: Albert Ho @ 2004-02-20 0:52 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
The application monitored by gdbserver uses pthread. So "strace
gdbserver :5000 foo" has libpthread.so.0.
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?
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: working version of gdb(x86) and gdbserver(ppc)?
2004-02-19 23:24 ` Daniel Jacobowitz
2004-02-20 0:52 ` Albert Ho
@ 2004-02-20 1:06 ` Albert Ho
1 sibling, 0 replies; 6+ messages in thread
From: Albert Ho @ 2004-02-20 1:06 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
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?
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-20 1:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-19 22:21 working version of gdb(x86) and gdbserver(ppc)? 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox