From: Jim Blandy Date: Mon, 25 Nov 2002 20:31:06 +0000 (+0000) Subject: * symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro. X-Git-Tag: cagney-unwind-20030108-branchpoint~635 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b29c9944faca0ff2d6434351419cc707ea974a8b;p=external%2Fbinutils.git * symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro. (SIZEOF_SECTION_OFFSETS): Use SIZEOF_N_SECTION_OFFSETS. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5123d69..f6e11e8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2002-11-25 Jim Blandy + * symtab.h (SIZEOF_N_SECTION_OFFSETS): New macro. + (SIZEOF_SECTION_OFFSETS): Use SIZEOF_N_SECTION_OFFSETS. + * symfile.c (syms_from_objfile): Adjust indentation. * symfile.c (symbol_file_add): Flush gdb_stdout even if from_tty diff --git a/gdb/symtab.h b/gdb/symtab.h index 46d3b97..a9411e8 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. */