Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] dwarf2read.c (load_partial_dies): Change condition to assert.
@ 2012-04-07 19:39 Doug Evans
  2012-04-07 20:40 ` Michael Eager
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2012-04-07 19:39 UTC (permalink / raw)
  To: gdb-patches

Hi.

There's no caller where cu->per_cu == NULL,
and I'd rather have the assert.

Regression tested on amd64-linux.

2012-04-07  Doug Evans  <dje@google.com>

	* dwarf2read.c (load_partial_dies): Change condition to assert.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.627
diff -u -p -r1.627 dwarf2read.c
--- dwarf2read.c	19 Mar 2012 19:59:19 -0000	1.627
+++ dwarf2read.c	7 Apr 2012 19:33:59 -0000
@@ -9522,7 +9522,8 @@ load_partial_dies (bfd *abfd, gdb_byte *
   parent_die = NULL;
   last_die = NULL;
 
-  if (cu->per_cu && cu->per_cu->load_all_dies)
+  gdb_assert (cu->per_cu != NULL);
+  if (cu->per_cu->load_all_dies)
     load_all = 1;
 
   cu->partial_dies


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

end of thread, other threads:[~2012-04-07 22:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-07 19:39 [commit] dwarf2read.c (load_partial_dies): Change condition to assert Doug Evans
2012-04-07 20:40 ` Michael Eager
2012-04-07 20:49   ` Doug Evans
2012-04-07 21:46     ` Michael Eager
2012-04-07 22:14       ` Doug Evans
2012-04-07 22:27         ` Michael Eager

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