Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: S?bastien Granjoux <seb.sfo@free.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix breakpoints when several source files have the same name
Date: Thu, 01 Oct 2009 21:45:00 -0000	[thread overview]
Message-ID: <20091001214459.GR10338@adacore.com> (raw)
In-Reply-To: <4AC51974.7010501@free.fr>

Sebastien,

Do you have a copyright assignment on file with the FSF? I cannot
seem to be able to find you in our records, at least not by using
your name. If you don't, then I am afraid that we cannot accept this
contribution until you do. This is a bit of a lengthy process, so
let me know if you need the request forms.

> 2009-10-01  Sebastien Granjoux <seb.sfo@free.fr>
> 
> 	PR mi/9583:
> 	* symtab.c (find_line_symtab, append_exact_match_to_sals):
> 	Use full filename if available

Overall, this looks OK to me (good catch on the FILENAME_CMP!).
I just have a few comments, little nits:

> +      /* Get symbol full file name if possible */

All comments should be full sentences, meaning that they should start
with capital letter, and end with a period.  The period should also
be followed by 2 spaces, so:

  /* Get symbol full file name if possible.  */

> +	if ((symtab->fullname != NULL)
> +	    && (symtab_to_fullname (s) != NULL)
> +	    && (FILENAME_CMP (symtab->fullname, s->fullname) != 0))

You have unecessary parenthesis, and we avoid that in GDB (we find
that this makes the code harder to read - if only because it uses
a different style than usual).

	if (symtab->fullname != NULL
	    && symtab_to_fullname (s) != NULL
	    && FILENAME_CMP (symtab->fullname, s->fullname) != 0)

> -append_exact_match_to_sals (char *filename, int lineno,
> +append_exact_match_to_sals (char *filename,
> +			    char *fullname, int lineno,
>  			    struct symtabs_and_lines *ret,
>  			    struct linetable_entry **best_item,
>  			    struct symtab **best_symtab)

The function comment needs to be updated. Can you also put all first
3 arguments on the same line. The line break is unnecessary.

> +	  if ((fullname != NULL)
> +	      && (symtab_to_fullname (symtab) != NULL)
> +    	      && (FILENAME_CMP (fullname, symtab->fullname) != 0))
> +    	    continue;		  

Same as above with the extra parens.


-- 
Joel


  reply	other threads:[~2009-10-01 21:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 21:05 Sébastien Granjoux
2009-10-01 21:45 ` Joel Brobecker [this message]
2009-10-02 20:28   ` Sébastien Granjoux
  -- strict thread matches above, loose matches on Subject: below --
2009-11-09 20:31 Sébastien Granjoux
2009-11-09 21:09 ` Joel Brobecker
2009-11-09 21:38   ` Sébastien Granjoux
2009-11-09 22:05     ` Joel Brobecker
2009-11-10 18:46       ` Sébastien Granjoux
2009-10-29 21:55 Sébastien Granjoux
2009-05-24 10:49 Sébastien Granjoux
2009-09-29 22:20 ` Joel Brobecker
2009-09-30 18:53   ` Sébastien Granjoux
2009-09-30 19:07     ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091001214459.GR10338@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=seb.sfo@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox