[PATCH 1/4] Change field separator in gdbarch.sh

Simon Marchi simon.marchi@polymtl.ca
Wed Apr 19 04:03:00 GMT 2017


On 2017-04-18 16:20, Pedro Alves wrote:
> On 04/16/2017 03:14 PM, Simon Marchi wrote:
>> --- a/gdb/gdbarch.h
>> +++ b/gdb/gdbarch.h
>> @@ -129,7 +129,7 @@ extern void set_gdbarch_bits_big_endian (struct 
>> gdbarch *gdbarch, int bits_big_e
>> 
>>  /* Number of bits in a char or unsigned char for the target machine.
>>     Just like CHAR_BIT in <limits.h> but describes the target machine.
>> -   v:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
>> +   v;TARGET_CHAR_BIT;int;char_bit;;;;8 * sizeof (char);8;;0;
> 
> BTW, do you know why does this bit appear in the .h file in the
> first place?

It's in gdbarch.h because gdbarch.sh thinks it's part of the comment 
above short_bit, so it gets copied verbatim to the .h.  I don't know why 
it's there though.  It seems like it's been there for a really long 
time, but has always been commented out.  I had not seen it before doing 
this patch, and didn't worry too much about it.

Perhaps it was seen as a possible extension in case someone would bother 
adding support for targets with non-8-bit-bytes?  If so, the 
addressable_memory_unit_size method kind of took that place.

Any better guess?

Simon



More information about the Gdb-patches mailing list