Re: [PATCH v5 1/5] gdb: make gdbarch store a vector of frame unwinders

Guinevere Larsen
2024-10-08T17:02:04Z

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

Thanks for the review!

On 10/2/24 6:49 PM, Thiago Jung Bauermann wrote:
>> @@ -355,11 +327,10 @@ maintenance_info_frame_unwinders (const char *args, int from_tty)
>> uiout->table_header (25, ui_left, "type", "Type");
>> uiout->table_body ();
>>
>> - for (struct frame_unwind_table_entry *entry = table->list; entry != NULL;
>> - entry = entry->next)
>> + for (auto unwinder : table)
>> {
>> - const char *name = entry->unwinder->name;
>> - const char *type = frame_type_str (entry->unwinder->type);
>> + const char *name = unwinder->name;
>> + const char *type = frame_type_str (unwinder->type);
> Did you try getting rid of the local vars here, as Simon suggested?
> I agree with him that seem unnecessary.
I must have overlooked Simon's original suggestion. Considering he has
approved with minor nits fixed, I'll send a follow up patch removing
these, once this is merged.

--
Cheers,
Guinevere Larsen
She/Her/Hers

>
>> ui_out_emit_list tuple_emitter (uiout, nullptr);
>> uiout->field_string ("name", name);

[-- Attachment #2: Type: text/html, Size: 1965 bytes --]