[PATCH [2/2] Convert the unavailable vector to be bit, not byte, based.
Andrew Burgess
aburgess@broadcom.com
Tue Dec 17 17:30:00 GMT 2013
On 11/12/2013 6:45 PM, Pedro Alves wrote:
> On 12/11/2013 04:28 PM, Andrew Burgess wrote:
>> +
>> + It is assumed that memory can be accessed from:
>> + PTR + (OFFSET_BITS / TARGET_CHAR_BIT)
>> + to:
>> + PTR + ((OFFSET_BITS + TARGET_CHAR_BIT - 1)/ TARGET_CHAR_BIT) */
>
> The "to:" part doesn't look right -- LENGTH_BITS seems to be
> missing somewhere? Also, missing space before second "/".
Fixed as:
+ It is assumed that memory can be accessed from:
+ PTR + (OFFSET_BITS / TARGET_CHAR_BIT)
+ to:
+ PTR + ((OFFSET_BITS + LENGTH_BITS + TARGET_CHAR_BIT - 1)
+ / TARGET_CHAR_BIT) */
>
>> + bits = TARGET_CHAR_BIT - (offset1_bits % TARGET_CHAR_BIT);
>
> Unnecessary parens.
Tightened up on this throughout.
>
>> + b1 = *((bfd_byte *) ((uintptr_t) ptr1 + (o1 / TARGET_CHAR_BIT)));
>> + b2 = *((bfd_byte *) ((uintptr_t) ptr2 + (o2 / TARGET_CHAR_BIT)));
>
> No need for uintptr_t, nor the rightmost set of parens:
Fixed.
>
> Otherwise looks OK. Thanks a lot for doing this!
I've pushed a version with those minor fixes.
Thanks for all your reviews.
Andrew
More information about the Gdb-patches
mailing list