From: Joel Brobecker <brobecker@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] unexpected multiple location for breakpoint
Date: Wed, 29 Dec 2010 08:08:00 -0000 [thread overview]
Message-ID: <20101229054930.GA10005@adacore.com> (raw)
In-Reply-To: <20101229054841.GF2396@adacore.com>
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
> For the record, attached is the patch that I used.
[attached, this time]
--
Joel
[-- Attachment #2: break-all-locs.diff --]
[-- Type: text/x-diff, Size: 1178 bytes --]
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 =
next prev parent reply other threads:[~2010-12-29 5:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 1:10 Joel Brobecker
2010-11-26 17:29 ` Joel Brobecker
2010-11-27 18:35 ` Daniel Jacobowitz
2010-12-10 12:23 ` Joel Brobecker
2010-12-28 11:50 ` Joel Brobecker
2010-12-28 20:15 ` Eli Zaretskii
2010-12-29 6:08 ` Joel Brobecker
2010-12-29 8:08 ` Joel Brobecker [this message]
2010-12-29 19:30 ` Eli Zaretskii
2010-12-30 20:40 ` Joel Brobecker
2010-12-30 21:03 ` Eli Zaretskii
2010-12-31 6:35 ` Michael Snyder
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=20101229054930.GA10005@adacore.com \
--to=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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