This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix breakpoints when several source files have the same name
- From: Joel Brobecker <brobecker at adacore dot com>
- To: S?bastien Granjoux <seb dot sfo at free dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 9 Nov 2009 13:08:49 -0800
- Subject: Re: Fix breakpoints when several source files have the same name
- References: <4AF87BF4.5040303@free.fr>
Sebastien,
Would you mind sending unified diffs, next time. There seems to be
a preference of unified diffs over context diffs. (thank you!)
2009-10-29 Sebastien Granjoux <seb.sfo@free.fr>
PR mi/9583:
* symtab.c (find_line_symtab, append_exact_match_to_sals)
(expand_line_sal): Use full filename when setting breakpoints if
available
This is OK with one minor comment:
> /* Helper to expand_line_sal below. Search in the symtabs for any
> ! linetable entry that exactly matches FILENAME and LINENO and append
> ! them to RET. If there is at least one match, return 1; otherwise,
> ! return 0, and return the best choice in BEST_ITEM and BEST_SYMTAB. */
>
> static int
> ! append_exact_match_to_sals (char *filename, int lineno,
> struct symtabs_and_lines *ret,
> struct linetable_entry **best_item,
> struct symtab **best_symtab)
> --- 4598,4611 ----
> }
>
> /* Helper to expand_line_sal below. Search in the symtabs for any
> ! linetable entry that exactly matches FULLNAME and LINENO and append
> ! them to RET. If FULLNAME is NULL or if a symbol has no full name,
> ! use FILENAME and LINENO instead. If there is at least one match,
> ! return 1; otherwise, return 0, and return the best choice in BEST_ITEM
> ! and BEST_SYMTAB. */
Periods need to be followed by 2 spaces (GNU Coding Standards). I realize
that the text you started with had the problem too! Also, I believe there
is a typo "symbol has no full name" -> "symtab has no full name"?
Pre-approved with the changes above. Have your assignment request
come through, yet?
--
Joel