[PATCH v3 3/3] gdb/amdgpu: add precise-memory support

Simon Marchi simon.marchi@polymtl.ca
Fri Sep 15 20:19:58 GMT 2023


On 9/15/23 13:16, Lancelot SIX via Gdb-patches wrote:
>>> Moving the initialization in the ctor's body would solve the issue
>>>
>>>   explicit amd_dbgapi_inferior_info (inferior *inf,
>>>                                      bool precise_memory_requested = false)
>>>     : inf {inf}
>>>   {
>>>     precise_memory.requested = precise_memory_requested;
>>>   }
>>>
>>> The alternative would be to name
>>> amd_dbgapi_inferior_info::precise_memory's type and give it a ctor.
>>
>> In this case I would just do:
>>
>> diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c
>> index 507824decf8d..40baf156d83f 100644
>> --- a/gdb/amd-dbgapi-target.c
>> +++ b/gdb/amd-dbgapi-target.c
>> @@ -119,8 +119,10 @@ struct amd_dbgapi_inferior_info
>>  {
>>    explicit amd_dbgapi_inferior_info (inferior *inf,
>>  				     bool precise_memory_requested = false)
>> -    : inf {inf}, precise_memory {precise_memory_requested}
>> -  {}
>> +    : inf (inf)
>> +  {
>> +    precise_memory.requested = precise_memory_requested;
>> +  }
> 
> That would work for me.

Thanks, pushed with that fixed (added your Approved-By).

Simon


More information about the Gdb-patches mailing list