[PATCH 2/2] Add "set/show debug unwinder" prefix commands.
Doug Evans
dje@google.com
Sat May 30 19:25:00 GMT 2009
On Fri, May 29, 2009 at 4:16 PM, Samuel Bronson <naesten@gmail.com> wrote:
> Also add one subcommand for tracing the sniffing of stack frames by
> unwinders.
>
> [...]
> +/* trace unwinders called */
> +static int trace_unwinders;
[N.B. None of this is binding. Just "fwiw".]
Just some nits:
I don't care *too* much about the naming, but I do care about
following existing conventions and gdb seems to have a pretty
consistent convention of using "debug" in these situations instead of
"trace". E.g., debug_unwinders?
> void
> _initialize_frame_unwind (void)
> {
> frame_unwind_data = gdbarch_data_register_pre_init (frame_unwind_init);
> +
> + add_prefix_cmd ("unwinder", class_maintenance, set_debug_unwinder_cmd, _("\
> +Set stack frame unwinder debugging variables."),
> + &set_debug_unwinder_list, "set debug unwinder ",
> + 0, &setdebuglist);
> +
> + add_prefix_cmd ("unwinder", class_maintenance, show_debug_unwinder_cmd, _("\
> +Show stack frame unwinder debugging variables."),
> + &show_debug_unwinder_list, "set debug unwinder ",
> + 0, &showdebuglist);
> +
> + add_setshow_boolean_cmd ("trace-tried", class_maintenance, &trace_unwinders,
> + _("Set tracing of unwinders tried."),
> + _("Show tracing of unwinders tried."),
> + NULL /* main doc */,
> + NULL, NULL,
> + &set_debug_unwinder_list, &show_debug_unwinder_list);
> }
Adding another level of prefixes just for debugging the unwinder seems
excessive.
More information about the Gdb-patches
mailing list