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

Tom Tromey
2011-12-06T20:40:47Z

>>>>> "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