From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18287 invoked by alias); 29 Dec 2010 05:49:44 -0000 Received: (qmail 18278 invoked by uid 22791); 29 Dec 2010 05:49:43 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_BJ 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; Wed, 29 Dec 2010 05:49:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 523392BABFB; Wed, 29 Dec 2010 00:49:37 -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 f63khJdrffTI; Wed, 29 Dec 2010 00:49:37 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CFC8E2BABFA; Wed, 29 Dec 2010 00:49:36 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 44026145870; Wed, 29 Dec 2010 09:49:30 +0400 (RET) Date: Wed, 29 Dec 2010 08:08:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA] unexpected multiple location for breakpoint Message-ID: <20101229054930.GA10005@adacore.com> References: <1290474625-1582-1-git-send-email-brobecker@adacore.com> <20101126172942.GK2634@adacore.com> <20101127183532.GA10136@caradoc.them.org> <20101210122337.GC2596@adacore.com> <20101228112546.GB2436@adacore.com> <83tyhxbthv.fsf@gnu.org> <20101229054841.GF2396@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20101229054841.GF2396@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-12/txt/msg00537.txt.bz2 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 85 > For the record, attached is the patch that I used. [attached, this time] -- Joel --vtzGhvizbBRQ85DL Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="break-all-locs.diff" Content-length: 1178 diff --git a/gdb/symtab.c b/gdb/symtab.c index 9eb3784..23707d6 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4536,6 +4536,10 @@ append_exact_match_to_sals (char *filename, char *fullname, int lineno, exact = 1; append_expanded_sal (ret, objfile->pspace, symtab, lineno, item->pc); + + if (j + 1 < len + && l->item[j + 1].line == lineno) + j++; } else if (!exact && item->line > lineno && (*best_item == NULL @@ -4660,15 +4664,15 @@ expand_line_sal (struct symtab_and_line sal) at the first instruction of that line, hence we want to eliminate the highest address. */ - for (i = ret.nelts - 1; i >= 0; i--) - if (blocks[i] != NULL) - for (j = 0; j < ret.nelts; ++j) - if (j != i && filter[j] && contained_in (blocks[i], blocks[j])) - { - filter[i] = 0; - ++deleted; - break; - } +// for (i = ret.nelts - 1; i >= 0; i--) +// if (blocks[i] != NULL) +// for (j = 0; j < ret.nelts; ++j) +// if (j != i && filter[j] && contained_in (blocks[i], blocks[j])) +// { +// filter[i] = 0; +// ++deleted; +// break; +// } { struct symtab_and_line *final = --vtzGhvizbBRQ85DL--