Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Fix for PR gdb/12573
@ 2011-03-17  6:43 Paul Pluzhnikov
  2011-03-18 17:13 ` Tom Tromey
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Pluzhnikov @ 2011-03-17  6:43 UTC (permalink / raw)
  To: gdb-patches; +Cc: ppluzhnikov

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;
 }
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-15 20:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17  6:43 [patch] Fix for PR gdb/12573 Paul Pluzhnikov
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox