[PATCH 1/3] Rename some trace functions
Simon Marchi
simon.marchi@polymtl.ca
Fri Dec 2 19:13:00 GMT 2016
On 2016-12-02 14:05, Pedro Alves wrote:
> Seems unnecessarily verbose to me when just doing a simple integer
> conversion. E.g.:
>
> static_cast<int> (foo) + static_cast<int> (bar) + static_cast<int>
> (qux)
>
> vs
>
> (int) foo + (int) bar + (int) qux
>
> I don't think there's a real advantage.
I agree.
>> It might be a good idea to check that the resulting integer is smaller
>> than the array size. If we ever add new stop reasons, we could forget
>> to add array elements, so an error() here would catch it.
>
> That's highly unlikely, given that if you're adding a new reason,
> you'll need to be able to parse it from RSP, which requires
> get_rsp_name.
It seems enough then.
More information about the Gdb-patches
mailing list