[commit] dwarf2read.c (load_cu): Move assert to more useful location.
Doug Evans
dje@google.com
Mon Jan 2 00:31:00 GMT 2012
Hi.
There's no point in asserting a pointer != NULL after you've
dereferenced it.
2012-01-01 Doug Evans <dje@google.com>
* dwarf2read.c (load_cu): Move assert to more useful location.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.591
diff -u -p -r1.591 dwarf2read.c
--- dwarf2read.c 2 Jan 2012 00:23:50 -0000 1.591
+++ dwarf2read.c 2 Jan 2012 00:28:08 -0000
@@ -1833,9 +1833,9 @@ load_cu (struct dwarf2_per_cu_data *per_
else
load_full_comp_unit (per_cu, per_cu->objfile);
- dwarf2_find_base_address (per_cu->cu->dies, per_cu->cu);
-
gdb_assert (per_cu->cu != NULL);
+
+ dwarf2_find_base_address (per_cu->cu->dies, per_cu->cu);
}
/* Read in the symbols for PER_CU. OBJFILE is the objfile from which
More information about the Gdb-patches
mailing list