aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-03-07 16:38:26 -0800
committerDoug Evans <dje@google.com>2014-03-07 16:38:26 -0800
commitc4a3fee29d3ba37f256fd57cecd071f61c552202 (patch)
tree9a13858138ead6fa6087cc23ae27e041bc775b90 /gdb
parent3156469ca870821d972a3f9d242379b86e622c95 (diff)
downloadgdb-c4a3fee29d3ba37f256fd57cecd071f61c552202.zip
gdb-c4a3fee29d3ba37f256fd57cecd071f61c552202.tar.gz
gdb-c4a3fee29d3ba37f256fd57cecd071f61c552202.tar.bz2
read_cutu_die_from_dwo: Misc minor cleanups.
* dwarf2read.c (read_cutu_die_from_dwo): Fix function comment. Remove unused local comp_dir_attr. Assert exactly one of stub_comp_unit_die, stub_comp_dir is non-NULL.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dwarf2read.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ff962d4..b8fa584 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-07 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (read_cutu_die_from_dwo): Fix function comment.
+ Remove unused local comp_dir_attr. Assert exactly one of
+ stub_comp_unit_die, stub_comp_dir is non-NULL.
+
2014-03-07 Joel Brobecker <brobecker@adacore.com>
* target.h (complete_target_initialization, add_target):
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8a850f1..92c7a83 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4947,7 +4947,7 @@ init_cu_die_reader (struct die_reader_specs *reader,
STUB_COMP_DIR is similar to STUB_COMP_UNIT_DIE: When reading a TU directly
from the DWO file, bypassing the stub, it contains the DW_AT_comp_dir
attribute of the referencing CU. Exactly one of STUB_COMP_UNIT_DIE and
- COMP_DIR must be non-NULL.
+ STUB_COMP_DIR must be non-NULL.
*RESULT_READER,*RESULT_INFO_PTR,*RESULT_COMP_UNIT_DIE,*RESULT_HAS_CHILDREN
are filled in with the info of the DIE from the DWO file.
ABBREV_TABLE_PROVIDED is non-zero if the caller of init_cutu_and_read_dies
@@ -4976,11 +4976,10 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu,
int i,num_extra_attrs;
struct dwarf2_section_info *dwo_abbrev_section;
struct attribute *attr;
- struct attribute comp_dir_attr;
struct die_info *comp_unit_die;
- /* Both can't be provided. */
- gdb_assert (! (stub_comp_unit_die && stub_comp_dir));
+ /* Exactly one of these must 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.