Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-22 Thread Yue Lu
Hi! On Thu, Sep 05, 2013 at 11:37:36PM +0200, Thomas Schwinge wrote: > Confirm that you haven't caused any regressions by running the GDB > testsuite (natively) without and then with your change (don't forget to > apply the testsuite patch I gave you earlier, to avoid the testsuite > hanging (know

FAIL: gdb.base/nextoverexit.exp: next over exit (the program exited) (was: [PATCH 1/2] Port gdbserver to GNU/Hurd)

2013-09-19 Thread Thomas Schwinge
Hi! On Thu, 19 Sep 2013 15:40:40 +0800, Yue Lu wrote: > On Wed, Sep 18, 2013 at 8:37 PM, Pedro Alves wrote: > > On 09/12/2013 04:05 AM, Yue Lu wrote: > > > >> On Sat, Sep 7, 2013 at 2:53 AM, Pedro Alves wrote: > >>> https://sourceware.org/ml/gdb-patches/2013-09/msg00253.html > First thank you

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-19 Thread Yue Lu
Hi, On Wed, Sep 18, 2013 at 8:37 PM, Pedro Alves wrote: > On 09/12/2013 04:05 AM, Yue Lu wrote: > >> On Sat, Sep 7, 2013 at 2:53 AM, Pedro Alves wrote: >>> This is what I meant: >>> https://sourceware.org/ml/gdb-patches/2013-09/msg00253.html >>> >>> I was thinking you'd wrap gnu_xfer_memory. >>

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-18 Thread Pedro Alves
On 09/18/2013 02:48 PM, Yue Lu wrote: > (btw, with > unknown reason, I can't patch your patch automatically, I have to > modify the gnu-nat.c line by line according to your patch). I'm going to guess you copy/pasted the patch to a new file, and while doing that, something (your editor or mailer?)

[Hurd/gnu-nat.c] Use ptid_t.lwpid to store, thread ids instead of ptid_t.tid. (was: Re: [PATCH 1/2] Port gdbserver to GNU/Hurd)

2013-09-18 Thread Pedro Alves
On 09/18/2013 02:48 PM, Yue Lu wrote: > On Wed, Sep 18, 2013 at 8:11 PM, Pedro Alves wrote: >> >> /me gives it a try. >> >> I grepped for ptid_build and ptid_get_tid in *gnu* files, and >> adjusted all I found. > > I have tried this way before, but it doesn't work. > After apply your patch, the g

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-18 Thread Yue Lu
Hi, On Wed, Sep 18, 2013 at 8:11 PM, Pedro Alves wrote: > On 09/09/2013 10:58 AM, Thomas Schwinge wrote: >> Hi! >> >> On Sun, 8 Sep 2013 21:35:05 +0800, Yue Lu wrote: >>> On Fri, Sep 6, 2013 at 5:37 AM, Thomas Schwinge >>> wrote: > (correct me if > I'm wrong here), the Hurd's threads a

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-18 Thread Pedro Alves
On 09/12/2013 04:05 AM, Yue Lu wrote: > On Sat, Sep 7, 2013 at 2:53 AM, Pedro Alves wrote: >> This is what I meant: >> https://sourceware.org/ml/gdb-patches/2013-09/msg00253.html >> >> I was thinking you'd wrap gnu_xfer_memory. >> > > I have study your patch, Thanks. Did you try building gdb

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-18 Thread Pedro Alves
On 09/12/2013 04:05 AM, Yue Lu wrote: > Honestly to say, I have copied them from function gnu_xfer_memory. But > I think, before reference a pointer, check whether it was a NULL seems > not a bad way :-). We don't go around checking for NULL before _every_ pointer dereference. :-) NULL pointer c

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-18 Thread Pedro Alves
On 09/09/2013 10:58 AM, Thomas Schwinge wrote: > Hi! > > On Sun, 8 Sep 2013 21:35:05 +0800, Yue Lu wrote: >> On Fri, Sep 6, 2013 at 5:37 AM, Thomas Schwinge >> wrote: (correct me if I'm wrong here), the Hurd's threads are kernel threads >>> >>> Correct. >>> so it'd be better

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-11 Thread Yue Lu
Hi, On Sat, Sep 7, 2013 at 2:53 AM, Pedro Alves wrote: > This is what I meant: > https://sourceware.org/ml/gdb-patches/2013-09/msg00253.html > > I was thinking you'd wrap gnu_xfer_memory. > I have study your patch, but I found there is no to_xfer_partial field or something similar in gdbserver's

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-09 Thread Yue Lu
Hi, On Fri, Sep 6, 2013 at 3:29 AM, Pedro Alves wrote: > I'm actually very excited to see gdb and gdbserver sharing > a single target backend, even if we still have many wrinkles > in the interfaces to iron out! It does looks like this way > results in lots of less work, and makes me believe we

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-09 Thread Thomas Schwinge
Hi! On Sun, 8 Sep 2013 21:35:05 +0800, Yue Lu wrote: > On Fri, Sep 6, 2013 at 5:37 AM, Thomas Schwinge > wrote: > >> (correct me if > >> I'm wrong here), the Hurd's threads are kernel threads > > > > Correct. > > > >> so it'd > >> be better to just make the GDB side use the lwp field too. > >>

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-08 Thread Yue Lu
Hi, On Fri, Sep 6, 2013 at 5:37 AM, Thomas Schwinge wrote: >> (correct me if >> I'm wrong here), the Hurd's threads are kernel threads > > Correct. > >> so it'd >> be better to just make the GDB side use the lwp field too. >> It's really a simple and mechanic change. Nothing in GDB core >> actua

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-06 Thread Pedro Alves
Hi! On 09/05/2013 08:29 PM, Pedro Alves wrote: >> > +static int >> > +gnu_read_memory (CORE_ADDR addr, unsigned char *myaddr, int length) >> > +{ >> > + int ret = 0; >> > + task_t task = (gnu_current_inf >> > + ? (gnu_current_inf->task >> > +? gnu_current_inf->task->port : 0) : 0); >> > + i

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-05 Thread Thomas Schwinge
Hi! Just a very quick one; short on time. On Thu, 05 Sep 2013 20:29:43 +0100, Pedro Alves wrote: > On 09/05/2013 11:53 AM, Yue Lu wrote: > > This is the my new patch. You've received quite some positive feedback, good! :-) > Thanks. Follows a few comments, by no means an in depth review. Th

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-05 Thread Joel Brobecker
> I'm actually very excited to see gdb and gdbserver sharing > a single target backend, even if we still have many wrinkles > in the interfaces to iron out! Mee too! -- Joel

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-05 Thread Pedro Alves
On 09/05/2013 11:53 AM, Yue Lu wrote: > Hi, > > This is the my new patch. Thanks. Follows a few comments, by no means an in depth review. We'll probably need to iterate a few times. I'm counting on Thomas and others to help as well! I'm actually very excited to see gdb and gdbserver sharing a

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-05 Thread Yue Lu
Hi, This is the my new patch. On Tue, Sep 3, 2013 at 7:11 PM, Pedro Alves wrote: > So my idea would be, instead of adding the new files under gdbserver, > to remove the spurious differences (formatting, reordering, etc.) that > were introduced in the gdbserver copies of the files, eliminating th

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Yue Lu
Hi, On Tue, Sep 3, 2013 at 9:09 PM, Thomas Schwinge wrote: > Hi! > > On Tue, 03 Sep 2013 12:11:02 +0100, Pedro Alves wrote: >> On 09/03/2013 10:38 AM, Thomas Schwinge wrote: >> > [strategy] >> >> I've been thinking about this this morning, after seeing these >> patches. >> >> For new gdbserver p

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Yue Lu
Thanks for your review! On Tue, Sep 3, 2013 at 7:11 PM, Pedro Alves wrote: > > For new gdbserver ports, this path just seems to swim further away from > a full sharing approach, by adding lots duplication as first step, and > actually making it hard to see what exactly needed to be changed/adapte

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Thomas Schwinge
Hi! On Tue, 03 Sep 2013 12:11:02 +0100, Pedro Alves wrote: > On 09/03/2013 10:38 AM, Thomas Schwinge wrote: > > [strategy] > > I've been thinking about this this morning, after seeing these > patches. > > For new gdbserver ports, this path just seems to swim further away from > a full sharing a

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Pedro Alves
On 09/03/2013 10:38 AM, Thomas Schwinge wrote: > Hi! > > For context, Yue Lu is a student participating in this year's Google > Summer of Code program, to port gdbserver to GNU Hurd, and is both a GDB > as well as a GNU Hurd newbie. (So, be gentle.) ;-) > > On Tue, 3 Sep 2013 16:00:32 +0800, Yu

Re: [PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Thomas Schwinge
Hi! For context, Yue Lu is a student participating in this year's Google Summer of Code program, to port gdbserver to GNU Hurd, and is both a GDB as well as a GNU Hurd newbie. (So, be gentle.) ;-) On Tue, 3 Sep 2013 16:00:32 +0800, Yue Lu wrote: > This is my patch to port gdbserver to GNU/Hurd

[PATCH 1/2] Port gdbserver to GNU/Hurd

2013-09-03 Thread Yue Lu
Hi all, This is my patch to port gdbserver to GNU/Hurd. Most of code are copied from [gdb]/gdb/gnu-nat.c. Now the gdbserver on GNU/Hurd can set breakpoint and check memory or register(but without float-register support). You can also view the code on my github. https://github.com/hacklu/gdbserve