From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9554 invoked by alias); 9 Nov 2009 21:09:10 -0000 Received: (qmail 9544 invoked by uid 22791); 9 Nov 2009 21:09:09 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Nov 2009 21:09:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A22362BAC9E; Mon, 9 Nov 2009 16:09:04 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OBc9SX4o9AmJ; Mon, 9 Nov 2009 16:09:04 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5584F2BAC83; Mon, 9 Nov 2009 16:09:04 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 29AF9F5905; Mon, 9 Nov 2009 13:08:49 -0800 (PST) Date: Mon, 09 Nov 2009 21:09:00 -0000 From: Joel Brobecker To: S?bastien Granjoux Cc: gdb-patches@sourceware.org Subject: Re: Fix breakpoints when several source files have the same name Message-ID: <20091109210849.GS4557@adacore.com> References: <4AF87BF4.5040303@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AF87BF4.5040303@free.fr> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00183.txt.bz2 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 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