From: Doug Evans Date: Thu, 3 Apr 2014 19:07:25 +0000 (-0700) Subject: * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most one X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0aeadb398e0cea7a7f0ff3e6fb20c9aea98453c;p=binutils-gdb.git * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most one of stub_comp_unit_die, stub_comp_dir is non-NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b9539403fc9..ea3d9763a6e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-04-03 Doug Evans + + * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most one + of stub_comp_unit_die, stub_comp_dir is non-NULL. + 2014-04-02 Alan Modra * symfile-mem.c (symbol_file_add_from_memory): Add size parameter. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 3e77cf8350d..103219c9416 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4977,8 +4977,8 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu, struct attribute *attr; struct die_info *comp_unit_die; - /* Exactly one of these must be provided. */ - gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) == 1); + /* At most one of these may be provided. */ + gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) <= 1); /* These attributes aren't processed until later: DW_AT_stmt_list, DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges.