Re: [PATCH 2/4] gdb: add "unwinder class" to frame unwinders

Tom Tromey
2024-03-08T16:41:03Z

>>>>> Guinevere Larsen <blarsen@redhat.com> writes:

> A future patch will add a way to disable certain unwinders based on
> different characteristics. This patch aims to make it more convenient
> to disable related unwinders in bulk, such as architecture specific
> ones, by indentifying all unwinders by which part of the code adds it.
> The classes, and explanations, are as follows:

Thanks.

> +/* Conversion list between the enum for frame_unwind_class and
> + string. */
> +static std::map<enum frame_unwind_class, std::string> unwind_class_conversion =

This should probably map to const char *.
That would avoid some unnecessary allocations.

> +enum frame_unwind_class {
> + FRAME_UNWIND_GDB,
> + FRAME_UNWIND_EXTENSION,
> + FRAME_UNWIND_DEBUGINFO,
> + FRAME_UNWIND_ARCH,
> +};

This should have a bunch of comments.
Also the "{" should probably be on the next line.

Tom