aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-06-07 17:30:12 +0000
committerDoug Evans <dje@google.com>2012-06-07 17:30:12 +0000
commit034e5797f031bded01cfdf48546300ec862bc36b (patch)
treebe5093432602819d24659894373eecc555298243
parentfef632e18b6b6ff62fe93803650caba68fe9f33a (diff)
downloadgdb-034e5797f031bded01cfdf48546300ec862bc36b.zip
gdb-034e5797f031bded01cfdf48546300ec862bc36b.tar.gz
gdb-034e5797f031bded01cfdf48546300ec862bc36b.tar.bz2
* dwarf2read.c (dwarf2_cu): Add comment.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/dwarf2read.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 46188d1..6e5d0872 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2012-06-07 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (dwarf2_cu): Add comment.
+
2012-06-06 Maciej W. Rozycki <macro@codesourcery.com>
* mips-tdep.c (mips_pseudo_register_type): Remove tdep local
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 23779ac..589361e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -412,7 +412,15 @@ struct dwarf2_cu
/* To be copied to symtab->call_site_htab. */
htab_t call_site_htab;
- /* Non-NULL if this CU came from a DWO file. */
+ /* Non-NULL if this CU came from a DWO file.
+ There is an invariant here that is important to remember:
+ Except for attributes copied from the top level DIE in the "main"
+ (or "stub") file in preparation for reading the DWO file
+ (e.g., DW_AT_GNU_addr_base), we KISS: there is only *one* CU.
+ Either there isn't a DWO file (in which case this is NULL and the point
+ is moot), or there is and either we're not going to read it (in which
+ case this is NULL) or there is and we are reading it (in which case this
+ is non-NULL). */
struct dwo_unit *dwo_unit;
/* The DW_AT_addr_base attribute if present, zero otherwise