summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-11-25 20:31:06 +0000
committerJim Blandy <jimb@codesourcery.com>2002-11-25 20:31:06 +0000
commitb29c9944faca0ff2d6434351419cc707ea974a8b (patch)
tree8400a6a89c317c02a5cbdc7f3ab3b8d04b869b95 /gdb/symtab.h
parent13de58df8b40d72e380c7b973c76d869512d910b (diff)
downloadbinutils-gdb-b29c9944faca0ff2d6434351419cc707ea974a8b.tar.gz
* symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro.
(SIZEOF_SECTION_OFFSETS): Use SIZEOF_N_SECTION_OFFSETS.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 46d3b972096..a9411e8870b 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -803,11 +803,13 @@ struct section_offsets
? (internal_error (__FILE__, __LINE__, "Section index is uninitialized"), -1) \
: secoff->offsets[whichone])
-/* The maximum possible size of a section_offsets table. */
-
-#define SIZEOF_SECTION_OFFSETS \
+/* The size of a section_offsets table for N sections. */
+#define SIZEOF_N_SECTION_OFFSETS(n) \
(sizeof (struct section_offsets) \
- + sizeof (((struct section_offsets *) 0)->offsets) * (SECT_OFF_MAX-1))
+ + sizeof (((struct section_offsets *) 0)->offsets) * ((n)-1))
+
+/* The maximum possible size of a section_offsets table. */
+#define SIZEOF_SECTION_OFFSETS (SIZEOF_N_SECTION_OFFSETS (SECT_OFF_MAX))
/* Each source file or header is represented by a struct symtab.
These objects are chained through the `next' field. */