This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Change field separator in gdbarch.sh
On 04/19/2017 05:03 AM, Simon Marchi wrote:
> 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.
Ah, it's commented out in gdbarch.sh. I hadn't looked, and confused it
with the gdbarch hook you had added before. But this is something much
older than that.
> 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?
Yeah, that looks like it.
> If so, the addressable_memory_unit_size method kind of took that place.
Guess we should just delete that commented out hook.
>
> Any better guess?
No.
Thanks,
Pedro Alves