public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [commit] (read_cutu_die_from_dwo): Fix assertion
@ 2014-04-03 19:09 Doug Evans
  2014-04-03 19:15 ` Doug Evans
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2014-04-03 19:09 UTC (permalink / raw)
  To: gdb-patches

Hi.

Thinko on my part, checked in as obvious.

2014-04-03  Doug Evans  <dje@google.com>

	* 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/dwarf2read.c b/gdb/dwarf2read.c
index 3e77cf8..103219c 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-03 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 19:09 [commit] (read_cutu_die_from_dwo): Fix assertion Doug Evans
2014-04-03 19:15 ` 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).