From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Cc: ppluzhnikov@google.com
Subject: [patch] Fix for PR gdb/12573
Date: Thu, 17 Mar 2011 06:43:00 -0000 [thread overview]
Message-ID: <20110316235418.34BA7190B17@elbrus2.mtv.corp.google.com> (raw)
Greetings,
Attached patch fixes http://sourceware.org/bugzilla/show_bug.cgi?id=12573
by removing (I believe incorrect) assertion.
The assertion is incorrect, because skip_prologue_sal may in fact put the
sal at a different line than what original_pc describes (if there are
inlined functions in the picture).
Also, we don't perform the same check if expanded.nelts == 1, which is why
the test from that PR does not cause a crash when built with GCC-4.6
(GCC-4.6 does not emit two copies -- C1 and C2 -- of a constructor).
If it did, we'd see the same crash there as well.
Thanks,
--
Paul Pluzhnikov
2011-03-16 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/12573
* breakpoint.c (expand_line_sal_maybe): Remove bogus assertion.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.552
diff -u -p -r1.552 breakpoint.c
--- breakpoint.c 14 Mar 2011 16:09:52 -0000 1.552
+++ breakpoint.c 16 Mar 2011 22:31:08 -0000
@@ -7447,18 +7447,6 @@ expand_line_sal_maybe (struct symtab_and
return expanded;
}
- if (original_pc)
- {
- found = 0;
- for (i = 0; i < expanded.nelts; ++i)
- if (expanded.sals[i].pc == original_pc)
- {
- found = 1;
- break;
- }
- gdb_assert (found);
- }
-
return expanded;
}
next reply other threads:[~2011-03-16 23:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 6:43 Paul Pluzhnikov [this message]
2011-03-18 17:13 ` Tom Tromey
2011-03-18 18:28 ` Paul Pluzhnikov
2011-03-18 18:28 ` Jan Kratochvil
2011-03-28 17:11 ` [patch] Do not skip prologue for -O2 -g with GCC VTA " Jan Kratochvil
2011-04-11 18:26 ` Paul Pluzhnikov
2011-04-15 20:19 ` obsolete: " 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=20110316235418.34BA7190B17@elbrus2.mtv.corp.google.com \
--to=ppluzhnikov@google.com \
--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