aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 101759f..55db0f8 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -829,7 +829,9 @@ struct section_offsets
CORE_ADDR offsets[1]; /* As many as needed. */
};
-#define ANOFFSET(secoff, whichone) (secoff->offsets[whichone])
+#define ANOFFSET(secoff, whichone) \
+ ((whichone == -1) ? \
+ (internal_error ("Section index is uninitialized"), -1) : secoff->offsets[whichone])
/* The maximum possible size of a section_offsets table. */