This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Add "set/show debug unwinder" prefix commands.

>>>>> "Samuel" == Samuel Bronson <> writes:

Samuel> Also add one subcommand for tracing the sniffing of stack
Samuel> frames by unwinders.

This is also basically ok; just needs a ChangeLog and some formatting
fixlets, nothing serious.

Samuel> +/* trace unwinders called */
Samuel> +static int trace_unwinders;

In the GNU style, comments should be sentences, so should start with a
capital letter and end with a period followed by two spaces.  Yes,
we're that nit picky ;)

There are a few instances of this.

Samuel> +  if (trace_unwinders) {
Samuel> +    fprintf_unfiltered (gdb_stdlog, "[ Searching for unwinder for frame ...\n");
Samuel> +  }

Drop the braces.

Samuel>    for (entry = table->list; entry != NULL; entry = entry->next)
Samuel>      {
Samuel>        struct cleanup *old_cleanup;
Samuel> +      const char *uname = entry->unwinder->unwinder_name;
Samuel> +
Samuel> +      if (trace_unwinders) {

The opening brace is misplaced here, in the GNU style it goes on the
next line.  There are a couple instances of this.

Samuel> +  add_setshow_boolean_cmd ("trace-tried", class_maintenance, &trace_unwinders,

I think this could just be "set debug unwinder", rather than
"set debug unwinder trace-tried".

If you do plan to send another "debug unwinder" sub-command, maybe we
could discuss the naming now, before the patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]