gdbserver (was Re: parcelling up struct gdbarch)

Fabrice Gautier
2001-07-16T17:24:00Z

On Mon, 16 Jul 2001 15:40:24 -0700
Daniel Jacobowitz <dmj+@andrew.cmu.edu> wrote:

> More specifically, right now my attempt is to get any gdbserver working
> in the exceedingly limited time frame before gdb 5.1 is released
> without gdbserver support for the majority of targets. I can't even
> test many of the targets gdbserver claims support for, but I have some
> severe doubts about when they last worked. If we can hash out the
> other portion of this thread, hopefully I can get at least Linux
> working again.

Hi,

My personnal focus is to be abble to debug thread apps with gdbserver on
linux-x86.

Fortunately for me, gdbserver still compile and works for linux-x86.

So i've been in the (difficult) process of dissecting gdb to understand
how that was supposed to be done and i've come down to three things to
be done:

1/ Make mywait in low-linux.c acts more or less like lin_lwp_wait does.
2/ Add support for thread query packet.
3/ Add thread information in T packets.

For 2/ I guess it will be only old-style queries.
Then 3/ need to be done correctly since this is the only way for the
other side to know about threads. Btw it seems to be mostly done (in
remote-utils.c), strange since there's no support to handle incoming
thread packets, look like this was just a copy/paste from the main gdb.

Now i'm focusing on studying lin_lwp_wait to see what's going on here...

I'm not sure if what i'm doing now would be usefull for the long-term
evolution of gdbserver but as Daniel, my goal is to have something
working rapidely

If any of you have any ideas about this issue, or if you have done some
work already, please share.

In the meantime i already have a question:

In the current gdbserver, when a new pthread is created, gdbserver sends
a T packet and the host gdb receive a SIGPWR signal. And i have to type
c to continue.

I guess gdbserver must send a T packet when a trhead is created so that
gdb knows about it, so im' wondering how to do so that gdb doesn't stop
everytime a new thread is created ?

Thanks

(Words of support are welcome too :)

--
Fabrice Gautier <gautier@email.enstfr>