[patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)

Tom Tromey tromey@redhat.com
Tue Dec 6 20:40:00 GMT 2011


>>>>> "iam" == iam ahal <hal9000ed2k@gmail.com> writes:

iam> Sorry for a late response, unfortunately, I've been busy at work.

No problem.  Thanks for following up.

iam> +static const char filename_display_without_comp_directory[] = "without-compilation-directory";

Just to be clear, the patch is contingent on the naming discussion that
is taking place.

iam> +get_filename_display_from_sal (struct symtab_and_line *sal)

How about const struct symtab_and_line *?

iam> +  else if (filename_display_string == filename_display_without_comp_directory
iam> +      && dirname && dlen && dlen <= strlen (filename)
iam> +      && !filename_ncmp (filename, dirname, dlen))

The indentation here looks wrong.
The "&&" should line up underneath "filename_display_string".

iam> +    {
iam> +      const char *start = filename + dlen;
iam> +      const char *result = start;
iam> +      while (IS_DIR_SEPARATOR (*result))

Blank line between declarations and code.

The rest looks reasonable to me.
Thanks again.

Tom



More information about the Gdb-patches mailing list