Re: [PATCH 3/4] gdb: Migrate frame unwinders to use C++ classes

Guinevere Larsen
2024-03-07T11:05:24Z

On 07/03/2024 12:01, Lancelot SIX wrote:
> On Wed, Mar 06, 2024 at 01:51:34PM +0100, Guinevere Larsen wrote:
>
> Hi Gwen,
>
> I have not read the specific of this series, but testing the patches as
> is causes a build failure on amdgpu-tdep.c
>
>> diff --git a/gdb/amdgpu-tdep.c b/gdb/amdgpu-tdep.c
>> index 8189de8e565..45c83a562e8 100644
>> --- a/gdb/amdgpu-tdep.c
>> +++ b/gdb/amdgpu-tdep.c
>> @@ -892,7 +892,7 @@ amdgpu_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
>> return frame_unwind_got_register (this_frame, regnum, regnum);
>> }
>>
>> -static const frame_unwind amdgpu_frame_unwind = {
>> +static const frame_unwind_legacy amdgpu_frame_unwind (
>> "amdgpu",
>> NORMAL_FRAME,
>> FRAME_UNWIND_ARCH,
>> @@ -903,7 +903,7 @@ static const frame_unwind amdgpu_frame_unwind = {
>> default_frame_sniffer,
>> nullptr,
>> nullptr,
> ^
> Moving from the aggregate initializer to a regular constructor call,
> this last coma must be removed.
>
> With this fixed, I tested this series on the gdb.rocm/*.exp part (both
> on upstream GDB and our downstream port) and see no regression.

Huh... it seems that the amdgpu target is not compiled when I used
`--enable-targets=all`, since I didn't get this build failure locally.

Thanks for spotting that, I'll update the patch locally!

--
Cheers,
Guinevere Larsen
She/Her/Hers

>
> I'll try to actually read the actual later.
>
> Best,
> Lancelot.
>
>> -};
>> +);
>>
>> static int
>> print_insn_amdgpu (bfd_vma memaddr, struct disassemble_info *info)
>>
>> --
>> 2.43.2
>>