[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] Port gdbserver to GNU/Hurd
From: |
Yue Lu |
Subject: |
Re: [PATCH 1/2] Port gdbserver to GNU/Hurd |
Date: |
Thu, 19 Sep 2013 15:40:40 +0800 |
Hi,
On Wed, Sep 18, 2013 at 8:37 PM, Pedro Alves <palves@redhat.com> wrote:
> On 09/12/2013 04:05 AM, Yue Lu wrote:
>
>> On Sat, Sep 7, 2013 at 2:53 AM, Pedro Alves <palves@redhat.com> 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 with it, and does the
> resulting GDB still work?
First thank you to tell me how to apply patch from email. I used
webmail of gmail and directly copy patch from the email which often
apply failed, then I had to patch line by line. Now I used mutt to
save email to mbox file then apply it, life changed! Before you told
me this, I never imaged this, so thanks!
I have test your patch, seems need a tiny fix. This is just a spelling
mistaken I think.
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 07fe603..bc37bb8 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2493,14 +2493,14 @@ gnu_xfer_memory (gdb_byte *readbuf, const char
*writebuf,
{
inf_debug (gnu_current_inf, "writing %s[%s] <-- %s",
paddress (target_gdbarch (), memaddr), plongest (len),
- host_address_to_string (myaddr));
+ host_address_to_string (writebuf));
res = gnu_write_inferior (task, memaddr, writebuf, len);
}
else
{
inf_debug (gnu_current_inf, "reading %s[%s] --> %s",
paddress (target_gdbarch (), memaddr), plongest (len),
- host_address_to_string (myaddr));
+ host_address_to_string (readbuf));
res = gnu_read_inferior (task, memaddr, readbuf, len);
}
if (res == 0)
After add this change, the gdb can work. But I have found a little
strange from the origin gdb.
When I set a breakpoint, then I run the inferior, after hit the
breakpoint, I just input next next until the inferior exit, then the
gdb will complain this:
[Inferior 1 (bogus thread id 0) exited normally]
Thread-specific breakpoint -37 deleted - thread 4 is gone.
Thread-specific breakpoint -38 deleted - thread 4 is gone.
Thread-specific breakpoint -39 deleted - thread 4 is gone.
Thread-specific breakpoint 0 deleted - thread 4 is gone.
I am not sure why this will output or is reasonable.
I got this output like this:
$./gdb gdb
$b main
$r
$n
$n
...
$q (quit the debugged gdb)
--
Yue Lu (陆岳)
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, (continued)
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Thomas Schwinge, 2013/09/09
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Pedro Alves, 2013/09/18
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Yue Lu, 2013/09/18
- [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), Pedro Alves, 2013/09/18
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Pedro Alves, 2013/09/18
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Yue Lu, 2013/09/22
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Pedro Alves, 2013/09/06
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Yue Lu, 2013/09/11
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Pedro Alves, 2013/09/18
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Pedro Alves, 2013/09/18
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd,
Yue Lu <=
- FAIL: gdb.base/nextoverexit.exp: next over exit (the program exited) (was: [PATCH 1/2] Port gdbserver to GNU/Hurd), Thomas Schwinge, 2013/09/19
- Re: FAIL: gdb.base/nextoverexit.exp: next over exit (the program exited), Pedro Alves, 2013/09/19
- Re: [PATCH 1/2] Port gdbserver to GNU/Hurd, Yue Lu, 2013/09/09