This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] dwarf2read.c (load_partial_dies): Change condition to assert.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Sat, 7 Apr 2012 12:39:15 -0700 (PDT)
- Subject: [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