Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	 	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"freephp@gmail.com" <freephp@gmail.com>
Subject: Re: [PATCH] Fix cygwin build error with i386-linux-tdep.c
Date: Wed, 09 Sep 2009 05:59:00 -0000	[thread overview]
Message-ID: <daef60380909082259x3ab880f5k7a79f6cc9f7db9d2@mail.gmail.com> (raw)
In-Reply-To: <4AA72116.1000302@vmware.com>

On Wed, Sep 9, 2009 at 11:29, Michael Snyder<msnyder@vmware.com> wrote:
> Hui Zhu wrote:
>>
>> Hi guys,
>>
>> What do you think about this patch?
>
> Hey, Hui,
>
> Appologies -- this patch of yours sort of got subsumed into my
> bigger syscall patch.  If you look at CVS head, I think everything
> that this patch changes is already in.

Great.
Thanks a lot.

Hui

>
> Didn't mean to "cut you out"...   ;-)
>
> Michael
>
>
>> On Sun, Sep 6, 2009 at 12:15, Hui Zhu<teawater@gmail.com> wrote:
>>>
>>> On Sun, Sep 6, 2009 at 05:15, Joel Brobecker<brobecker@adacore.com>
>>> wrote:
>>>>>
>>>>> I could suggest casting it to (unsigned int), but it wouldn't
>>>>> really make any difference, would it?  Mark -- Jiang -- would
>>>>> that make you guys more comfortable?
>>>>
>>>> Short term, I'd rather see us read the syscall number as a signed
>>>> number since this is what record_linux_system_call expects. We can
>>>> decide whether to rationalize as a signed or unsigned as a separate
>>>> patch. I think Mark was OK with the patch I sent yesterday, except
>>>> that he said we should add a check against negative values.
>>>>
>>>> There is also a cast that is unnecessary in the error message.
>>>> Hui can use %s/paddress rather than %d/cast.
>>>>
>>>> --
>>>> Joel
>>>>
>>> Hi guys,
>>>
>>> I make a new patch according to your comment.
>>>
>>> Thanks,
>>> Hui
>>>
>>>
>>> 2009-09-06  Michael Snyder  <msnyder@vmware.com>
>>>           Joel Brobecker  <brobecker@adacore.com>
>>>           Hui Zhu  <teawater@gmail.com>
>>>
>>>       * i386-linux-tdep.c (i386_linux_intx80_sysenter_record): Change
>>>       regcache_raw_read to regcache_raw_read_signed.
>>>
>>> Index: i386-linux-tdep.c
>>> ===================================================================
>>> RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
>>> retrieving revision 1.66
>>> diff -u -p -r1.66 i386-linux-tdep.c
>>> --- i386-linux-tdep.c   10 Aug 2009 03:04:44 -0000      1.66
>>> +++ i386-linux-tdep.c   6 Sep 2009 02:12:15 -0000
>>> @@ -367,18 +367,19 @@ static int
>>>  i386_linux_intx80_sysenter_record (struct regcache *regcache)
>>>  {
>>>  int ret;
>>> -  uint32_t tmpu32;
>>> +  LONGEST syscall;
>>>
>>> -  regcache_raw_read (regcache, I386_EAX_REGNUM, (gdb_byte *) &tmpu32);
>>> +  regcache_raw_read_signed (regcache, I386_EAX_REGNUM, &syscall);
>>>
>>> -  if (tmpu32 > 499)
>>> +  if (syscall < 0 || syscall > 499)
>>>    {
>>>      printf_unfiltered (_("Process record and replay target doesn't "
>>> -                           "support syscall number %u\n"), tmpu32);
>>> +                           "support syscall number %s\n"),
>>> +                        plongest (syscall));
>>>      return -1;
>>>    }
>>>
>>> -  ret = record_linux_system_call (tmpu32, regcache,
>>> +  ret = record_linux_system_call (syscall, regcache,
>>>                                 &i386_linux_record_tdep);
>>>  if (ret)
>>>    return ret;
>>>
>
>


  reply	other threads:[~2009-09-09  5:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30 13:56 Hui Zhu
2009-08-30 14:09 ` Mark Kettenis
2009-08-30 14:20   ` Hui Zhu
2009-08-30 15:00     ` Hui Zhu
2009-08-31  8:46       ` Hui Zhu
2009-08-31  8:49         ` Jiang Jilin
2009-08-31 12:05           ` Hui Zhu
2009-08-31 16:33             ` Mark Kettenis
2009-09-01  2:15               ` Hui Zhu
2009-09-05 20:34         ` Michael Snyder
2009-09-05 21:15           ` Joel Brobecker
2009-09-06  4:15             ` Hui Zhu
2009-09-09  2:22               ` Hui Zhu
2009-09-09  3:31                 ` Michael Snyder
2009-09-09  5:59                   ` Hui Zhu [this message]
2009-08-30 14:37   ` Andreas Schwab
2009-08-30 15:14     ` Hui Zhu
2009-08-30 15:22 ` Jiang Jilin
2009-08-30 18:00   ` Hui Zhu
2009-08-30 23:43     ` Jiang Jilin
2009-08-30 23:53       ` Hui Zhu
2009-08-31  0:32         ` Jiang Jilin
2009-08-31  2:52           ` Jiang Jilin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=daef60380909082259x3ab880f5k7a79f6cc9f7db9d2@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=freephp@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox