Re: [PATCH v3 2/8] gdbserver: Add PID parameter to linux_get_auxv and linux_get_hwcap

Simon Marchi via Gdb-patches
2023-02-01T16:01:46Z

>> @@ -946,17 +946,16 @@ extern int have_ptrace_getregset;
>> *VALP and return 1. If not found or if there is an error, return
>> 0. */
>>
>> -int linux_get_auxv (int wordsize, CORE_ADDR match,
>> - CORE_ADDR *valp);
>> +int linux_get_auxv (int pid, int wordsize, CORE_ADDR match, CORE_ADDR *valp);
>>
>> /* Fetch the AT_HWCAP entry from the auxv vector, where entries are length
>> WORDSIZE. If no entry was found, return zero. */
>>
>> -CORE_ADDR linux_get_hwcap (int wordsize);
>> +CORE_ADDR linux_get_hwcap (int pid, int wordsize);
>>
>> /* Fetch the AT_HWCAP2 entry from the auxv vector, where entries are length
>> WORDSIZE. If no entry was found, return zero. */
>>
>> -CORE_ADDR linux_get_hwcap2 (int wordsize);
>> +CORE_ADDR linux_get_hwcap2 (int pid, int wordsize);
>
> Ideally the comment for these three functions would be updated to
> mention the PID argument.
I think the patch is OK to push after addressing this comment.

Simon