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

Tom Tromey
2011-07-28T15:21:15Z

iam> - ui_out_field_string (uiout, "file", sal.symtab->filename);
iam> + ui_out_field_string (uiout, "file", display_filename);

Tom> I'm surprised this change has any effect.
Tom> I thought the compilation directory and the source file name were kept
Tom> separate in the symtab. What is actually happening?

Ah, ok -- you are using the absolute file name when compiling.
That seems weird to me, but I understand now.

I think instead of 'strstr' as a test, you want strncmp, followed by a
check to make sure that either the compilation directory ends with a
directory separator, or the following character in the source file name
is one.

Tom