* [commit] dwarf2read.c (load_cu): Move assert to more useful location.
@ 2012-01-02 0:31 Doug Evans
0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2012-01-02 0:31 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-02 0:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-02 0:31 [commit] dwarf2read.c (load_cu): Move assert to more useful location Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).