From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] append_composite_type_field_aligned
Date: Tue, 21 Jun 2011 12:54:00 -0000 [thread overview]
Message-ID: <4E009466.8080103@codesourcery.com> (raw)
In-Reply-To: <4E0068A2.8060505@broadcom.com>
On 06/21/2011 05:47 PM, Andrew Burgess wrote:
> ping.
>
> If there's anything else I should do to help progress this then please
> let me know.
>
I can't see there is anything else you should do. Just wait for
maintainers to review this patch.
>> gdb/ChangeLog
>>
>> 2011-06-09 Andrew Burgess<aburgess@broadcom.com>
>>
>> * gdbtypes.c (append_composite_type_field_aligned): Fix
>> calculation of bit position based on alignment.
>>
>> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
>> index 2bdb4eb..ba957f9 100644
>> --- a/gdb/gdbtypes.c
>> +++ b/gdb/gdbtypes.c
>> @@ -3654,12 +3654,14 @@ append_composite_type_field_aligned (struct
>> type *t, char *name,
>>
>> if (alignment)
>> {
>> - int left = FIELD_BITPOS (f[0]) % (alignment *
>> TARGET_CHAR_BIT);
>> + int left;
>> + alignment *= TARGET_CHAR_BIT;
>> + left = FIELD_BITPOS (f[0]) % alignment;
>>
>> if (left)
>> {
>> - FIELD_BITPOS (f[0]) += left;
>> - TYPE_LENGTH (t) += left / TARGET_CHAR_BIT;
>> + FIELD_BITPOS (f[0]) += (alignment - left);
>> + TYPE_LENGTH (t) += (alignment - left) / TARGET_CHAR_BIT;
>> }
>> }
>> }
I am not the people to approve this. I read your patch, and it looks
correct.
--
Yao (é½å°§)
next prev parent reply other threads:[~2011-06-21 12:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 15:35 Andrew Burgess
2011-06-21 9:47 ` Andrew Burgess
2011-06-21 12:54 ` Yao Qi [this message]
2011-06-22 19:55 ` Tom Tromey
2011-06-23 9:53 ` Andrew Burgess
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=4E009466.8080103@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/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