Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdbserver(ppc) segv on continue from gdb(x86) - v6.0
@ 2004-02-21  1:13 Albert Ho
  2004-02-21  1:18 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Ho @ 2004-02-21  1:13 UTC (permalink / raw)
  To: gdb

gdb version is 6.0. ppc kernel 2.4.18. linux-ppc-gcc is 2.95.3. cross 
compiled from x86.

gdbserver on PPC8270 has segv when continue from gdb(x86):

The backtrace
=============

This GDB was configured as "--host=ppc-linux --target=powerpc-linux"...

Core was generated by `gdbserver :5000 foo'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libthread_db.so.1...done.
Loaded symbols for /lib/libthread_db.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  td_thr_get_info (th=0xf4240, infop=0x7ffff398) at
td_thr_get_info.c:35
35      td_thr_get_info.c: No such file or directory.
        in td_thr_get_info.c
(gdb) bt
#0  td_thr_get_info (th=0xf4240, infop=0x7ffff398) at
td_thr_get_info.c:35
#1  0x10007044 in find_new_threads_callback (th_p=0xf4240,
data=0x7ffff398) at thread-db.c:289
#2  0x10006dd0 in thread_db_create_event (where=4294969443480472) at
thread-db.c:162
#3  0x10004a70 in check_breakpoints (stop_pc=4294969443480472) at
mem-break.c:201
#4  0x100059f4 in linux_wait_for_event (child=0x0) at linux-low.c:541
#5  0x10005b58 in linux_wait (status=0x7ffffd78 "T\005D") at
linux-low.c:645
#6  0x100041ac in mywait (statusp=0xf4240 <Address 0xf4240 out of
bounds>, connected_wait=2147480472) at target.c:97
#7  0x10003764 in main (argc=3, argv=0x7ffffdf4) at server.c:312
#8  0x0fee66c4 in __libc_start_main (argc=3, argv=0x7ffffdf4,
envp=0x7ffffe04, auxvec=0x7ffffe3c, rtld_fini=0xf4240,
    stinfo=0x10007310, stack_on_entry=0x7ffff450) at
../sysdeps/powerpc/elf/libc-start.c:106

The question
============
The interesting thing is, gdb(x86) can stop/continue gdbserver(8270)
if place gdbserver under gdb on the PPC 8270. i.e. 
$ gdb gdbserver
$ run :5000 foo

Is there a race condition in gdbserver in fetching thread info?

Thanks
Albert



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdbserver(ppc) segv on continue from gdb(x86) - v6.0
  2004-02-21  1:13 gdbserver(ppc) segv on continue from gdb(x86) - v6.0 Albert Ho
@ 2004-02-21  1:18 ` Daniel Jacobowitz
  2004-02-21  1:37   ` Albert Ho
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-02-21  1:18 UTC (permalink / raw)
  To: Albert Ho; +Cc: gdb

On Fri, Feb 20, 2004 at 05:14:05PM -0800, Albert Ho wrote:
> Is there a race condition in gdbserver in fetching thread info?

Not that I know of.  You've doublechecked that host GDB loaded the
right libpthread.so, right?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdbserver(ppc) segv on continue from gdb(x86) - v6.0
  2004-02-21  1:18 ` Daniel Jacobowitz
@ 2004-02-21  1:37   ` Albert Ho
  0 siblings, 0 replies; 3+ messages in thread
From: Albert Ho @ 2004-02-21  1:37 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Yeah. They look correct. I used the solib-absolute-prefix to point to 
the correct ppc lib.

The host gdb is a native gdb configured with
./configure --target=powerpc-linux --build=i686-pc-linux-gnu

Trying to debug why gdbserver segv, I ran "gdb gdbserver", "run :xxxx foo".
But doing do gdbserver runs happily. And remote debugging is possible.

I did strace on "gdb gdbserver" and "gdbserver :xxx foo". They all load 
the same lib. So lib should be ok here.

Daniel Jacobowitz wrote:

>On Fri, Feb 20, 2004 at 05:14:05PM -0800, Albert Ho wrote:
>  
>
>>Is there a race condition in gdbserver in fetching thread info?
>>    
>>
>
>Not that I know of.  You've doublechecked that host GDB loaded the
>right libpthread.so, right?
>
>  
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-21  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-21  1:13 gdbserver(ppc) segv on continue from gdb(x86) - v6.0 Albert Ho
2004-02-21  1:18 ` Daniel Jacobowitz
2004-02-21  1:37   ` Albert Ho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox