[ob] fix buf size in amd64_epilogue_frame_cache
Michael Snyder
msnyder@vmware.com
Thu Dec 24 18:51:00 GMT 2009
Joel Brobecker wrote:
>> 2009-12-20 Michael Snyder <msnyder@vmware.com>
>>
>> * amd64-tdep.c (amd64_epilogue_frame_cache): Fix buf size.
>
> I'm going to apply this patch to the gdb-7.0 branch as well.
>
>> - gdb_byte buf[4];
>> + gdb_byte buf[8];
>
> I think we should try to avoid using litteral constants like these,
> especially when we repeat that constant later. For instance, in
> this case, we could have used register_size, or something similar...
I don't think there's a simple "register_size" constant.
There's a register_size function, but that's not a good way
to declare an array size.
There's MAX_REGISTER_SIZE, but that's 16. A possibility.
If you've got a better suggestion...
More information about the Gdb-patches
mailing list