aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
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 /gdb/dwarf2read.c
parentfef632e18b6b6ff62fe93803650caba68fe9f33a (diff)
downloadgdb-034e5797f031bded01cfdf48546300ec862bc36b.zip
gdb-034e5797f031bded01cfdf48546300ec862bc36b.tar.gz
gdb-034e5797f031bded01cfdf48546300ec862bc36b.tar.bz2
* dwarf2read.c (dwarf2_cu): Add comment.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c10
1 files changed, 9 insertions, 1 deletions
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