This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] dwarf2read.c (load_partial_dies): Change condition to assert.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]