Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] tracepoint: fix tfile byte order issue
Date: Wed, 20 Oct 2010 14:04:00 -0000	[thread overview]
Message-ID: <AANLkTim7Qb1b3=auzzxW9DLGQFTUD_-np=W3RzOLWfzQ@mail.gmail.com> (raw)
In-Reply-To: <201010201128.17479.pedro@codesourcery.com>

On Wed, Oct 20, 2010 at 18:28, Pedro Alves <pedro@codesourcery.com> wrote:
> On Wednesday 20 October 2010 09:49:58, Hui Zhu wrote:
>> I make a new patch change to use target_gdbarch and use
>> extract_signed_integer in signed value.
>>
>> And I found that tfile_trace_find define the size of a frame to a int:
>> int data_size;
>>
>> But I found that gdbserver/tracepoint.c:struct traceframe:
>> unsigned int data_size : 32;
>>
>> So I change this int to unsigned int.
>
> Thanks.  It appears the format description in gdb.texinfo doesn't
> make that explicit, but indeed all sizes should be unsigned.
>
>> @@ -3665,6 +3665,9 @@ tfile_get_traceframe_address (off_t tfra
>>      perror_with_name (trace_filename);
>>    else if (gotten < 2)
>>      error (_("Premature end of file while reading trace file"));
>> +  tpnum = (short) extract_signed_integer ((gdb_byte *)&tpnum, 2,
>> +                                       gdbarch_byte_order
>> +                                           (target_gdbarch));
>
> I don't think you need all the casts to short, int, etc.. anymore.  Please
> add the missing space in the second cast: "(gdb_byte *) &tpnum" everywhere too.
>
> Otherwise okay.  Thanks.
>
> --
> Pedro Alves
>

Thanks Pedro.  Fixed and checked in.

Hui


      reply	other threads:[~2010-10-20 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14  6:41 Hui Zhu
2010-10-19  8:48 ` Hui Zhu
2010-10-19  9:20   ` Pedro Alves
2010-10-20  8:50     ` Hui Zhu
2010-10-20 10:28       ` Pedro Alves
2010-10-20 14:04         ` Hui Zhu [this message]

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='AANLkTim7Qb1b3=auzzxW9DLGQFTUD_-np=W3RzOLWfzQ@mail.gmail.com' \
    --to=teawater@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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