Re: [PATCH v1 01/10] gdb/linux-tdep: change linux_fill_prpsinfo to return bool

Matthieu Longo <[email protected]> Mon, 27 Jul 2026 15:38:26 +0100
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
On 09/07/2026 13:23, Simon Marchi wrote:
> 
> 
> On 2026-07-09 02:26, Thiago Jung Bauermann wrote:
>> Hello Matthieu,
>>
>> Thank you for these patches.
>>
>> Matthieu Longo <[email protected]> writes:
>>
>>> Change linux_fill_prpsinfo() to return a boolean instead of an integer, since
>>> it only reports success or failure.
>>> Replace the returned integer values 1 and 0 with true and false respectively.
>>> ---
>>>  gdb/linux-tdep.c | 22 +++++++++++-----------
>>>  1 file changed, 11 insertions(+), 11 deletions(-)
>>
>> In his review of an analogous patch, Simon suggested that this kind of
>> change could be pushed as obvious:
>>
>> https://inbox.sourceware.org/gdb-patches/[email protected]/
>>
>> I would agree, but I don't know if that's a generally accepted view.
> 
> Yeah, you still need to be careful, I did manage once to mess up and
> change a 0 into true or vice versa.
> 
> Also, try to change comments that use 0/1, or "zero"/"non-zero" so they
> say true/false.  I see you did it for comments inside the function, but
> the comment above the function also has thing that would need to be
> updated.
> 
>>
>> In any case:
>>
>> Reviewed-by: Thiago Jung Bauermann <[email protected]>
> 
> With the comment updated:
> 
> Approved-By: Simon Marchi <[email protected]>
> 
> Simon

Merged.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=067cdb3b087a78820e2e71ae5e7f7de7763712d5

Matthieu