This is the mail archive of the gdb-patches@sourceware.org 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] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)


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

Iam> First of all, I'm sorry for a late response (again).

No problem :)

Iam> Copyright assignment has been done.

Super.

I have just a few nits.

Iam> +If backtraces isn't easy to read due to a long absolute filename path recorded and 
Iam> +you just want to see only a basename or a relative filename path, you can change this 
Iam> +behaviour:

These lines are too long.
gdb uses the American English spelling, "behavior".
Eli will have to review the rest of the docs, these just jumped out at
me immediately.

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

In the GNU style, lines are broken before operators, not after.
So, the "&&"s should be moved.

Iam> +      const char *filename_display = get_filename_display_from_sal (&sal);
Iam> +
Iam> +      if (filename_display == NULL)
Iam> +	  filename_display = sal.symtab->filename;

It seems to me that you can just drop the NULL check.
When can filename_display be NULL, except with sal.symtab->filename is
already NULL?

Tom


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