+Thu Apr 20 10:12:21 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),
+ mdebugread.c (struct symloc), hpread.c (struct symloc): Clean
+ up comments.
+
Wed Apr 19 16:58:11 1995 Stu Grossman (grossman@andros.cygnus.com)
* hppa-tdep.c (deposit_17): New routine to deposit 17 bit
#define SEEK_SET 0
#define SEEK_CUR 1
#endif
-
+\f
/* Each partial symbol table entry contains a pointer to private data for the
- read_symtab() function to use when expanding a partial symbol table entry
- to a full symbol table entry.
+ sym_read function to use when expanding a partial symbol table entry
+ to a full symbol table entry. */
- For dbxread this structure contains the offset within the file symbol table
- of first local symbol for this file, and length (in bytes) of the section
- of the symbol table devoted to this file's symbols (actually, the section
- bracketed may contain more than just this file's symbols). It also contains
- further information needed to locate the symbols if they are in an ELF file.
-
- If ldsymlen is 0, the only reason for this thing's existence is the
- dependency list. Nothing else will happen when it is read in. */
+struct symloc {
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
-#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
-#define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
-#define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
-#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
-#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
+ /* Offset within the file symbol table of first local symbol for this
+ file. */
-struct symloc {
int ldsymoff;
+
+ /* Length (in bytes) of the section of the symbol table devoted to
+ this file's symbols (actually, the section bracketed may contain
+ more than just this file's symbols). If ldsymlen is 0, the only
+ reason for this thing's existence is the dependency list. Nothing
+ else will happen when it is read in. */
+
int ldsymlen;
+
+ /* The size of each symbol in the symbol file (in external form). */
+
int symbol_size;
+
+ /* Further information needed to locate the symbols if they are in
+ an ELF file. */
+
int symbol_offset;
int string_offset;
int file_string_offset;
};
+#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
+#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
+#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
+#define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
+#define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
+#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
+#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
+
+\f
/* Macro to determine which symbols to ignore when reading the first symbol
of a file. Some machines override this definition. */
#ifndef IGNORE_SYMBOL
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Deal with the SunPRO 3.0 compiler which omits the address
from N_FUN symbols. */
- if (type == N_FUN && valu == 0)
+ if (type == N_FUN
+ && valu == ANOFFSET (section_offsets, SECT_OFF_TEXT))
{
struct minimal_symbol *msym;
char *p;
static struct section_offsets *base_section_offsets;
/* Each partial symbol table entry contains a pointer to private data for the
- read_symtab() function to use when expanding a partial symbol table entry
- to a full symbol table entry. For DWARF debugging info, this data is
- contained in the following structure and macros are provided for easy
- access to the members given a pointer to a partial symbol table entry.
-
- dbfoff Always the absolute file offset to the start of the ".debug"
- section for the file containing the DIE's being accessed.
-
- dbroff Relative offset from the start of the ".debug" access to the
- first DIE to be accessed. When building the partial symbol
- table, this value will be zero since we are accessing the
- entire ".debug" section. When expanding a partial symbol
- table entry, this value will be the offset to the first
- DIE for the compilation unit containing the symbol that
- triggers the expansion.
-
- dblength The size of the chunk of DIE's being examined, in bytes.
-
- lnfoff The absolute file offset to the line table fragment. Ignored
- when building partial symbol tables, but used when expanding
- them, and contains the absolute file offset to the fragment
- of the ".line" section containing the line numbers for the
- current compilation unit.
- */
+ sym_read function to use when expanding a partial symbol table entry
+ to a full symbol table entry. */
struct dwfinfo {
- file_ptr dbfoff; /* Absolute file offset to start of .debug section */
- int dbroff; /* Relative offset from start of .debug section */
- int dblength; /* Size of the chunk of DIE's being examined */
- file_ptr lnfoff; /* Absolute file offset to line table fragment */
+ /* Always the absolute file offset to the start of the ".debug"
+ section for the file containing the DIE's being accessed. */
+ file_ptr dbfoff;
+ /* Relative offset from the start of the ".debug" section to the
+ first DIE to be accessed. When building the partial symbol
+ table, this value will be zero since we are accessing the
+ entire ".debug" section. When expanding a partial symbol
+ table entry, this value will be the offset to the first
+ DIE for the compilation unit containing the symbol that
+ triggers the expansion. */
+ int dbroff;
+ /* The size of the chunk of DIE's being examined, in bytes. */
+ int dblength;
+ /* The absolute file offset to the line table fragment. Ignored
+ when building partial symbol tables, but used when expanding
+ them, and contains the absolute file offset to the fragment
+ of the ".line" section containing the line numbers for the
+ current compilation unit. */
+ file_ptr lnfoff;
};
#define DBFOFF(p) (((struct dwfinfo *)((p)->read_symtab_private))->dbfoff)
} \
else \
*NAMEP = (SYM)->dsfile.name + VT (OBJFILE)
-
+\f
/* Each partial symbol table entry contains a pointer to private data for the
- read_symtab() function to use when expanding a partial symbol table entry
- to a full symbol table entry.
-
- For hpuxread this structure contains the offset within the file symbol table
- of first local symbol for this file, and length (in bytes) of the section
- of the symbol table devoted to this file's symbols (actually, the section
- bracketed may contain more than just this file's symbols).
-
- If ldsymlen is 0, the only reason for this thing's existence is the
- dependency list. Nothing else will happen when it is read in. */
-
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
-#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
+ sym_read function to use when expanding a partial symbol table entry
+ to a full symbol table entry. */
struct symloc
{
+ /* The offset within the file symbol table of first local symbol for
+ this file. */
+
int ldsymoff;
+
+ /* Length (in bytes) of the section of the symbol table devoted to
+ this file's symbols (actually, the section bracketed may contain
+ more than just this file's symbols). If ldsymlen is 0, the only
+ reason for this thing's existence is the dependency list.
+ Nothing else will happen when it is read in. */
+
int ldsymlen;
};
+#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
+#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
+#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
+\f
/* FIXME: Shouldn't this stuff be in a .h file somewhere? */
/* Nonzero means give verbose info on gdb action. */
extern int info_verbose;
#ifndef ECOFF_REG_TO_REGNUM
#define ECOFF_REG_TO_REGNUM(num) (num)
#endif
-
-/* Each partial symbol table entry contains a pointer to private data
- for the read_symtab() function to use when expanding a partial
- symbol table entry to a full symbol table entry.
-
- For mdebugread this structure contains the index of the FDR that this
- psymtab represents and a pointer to the BFD that the psymtab was
- created from. */
-
-#define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private)
-#define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx)
-#define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd)
-#define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap)
-#define DEBUG_INFO(p) (PST_PRIVATE(p)->debug_info)
-#define PENDING_LIST(p) (PST_PRIVATE(p)->pending_list)
+\f
+/* Each partial symbol table entry contains a pointer to private data for the
+ sym_read function to use when expanding a partial symbol table entry
+ to a full symbol table entry. */
struct symloc
{
+ /* Index of the FDR that this psymtab represents. */
int fdr_idx;
+ /* The BFD that the psymtab was created from. */
bfd *cur_bfd;
const struct ecoff_debug_swap *debug_swap;
struct ecoff_debug_info *debug_info;
struct mdebug_pending **pending_list;
- EXTR *extern_tab; /* Pointer to external symbols for this file. */
- int extern_count; /* Size of extern_tab. */
+ /* Pointer to external symbols for this file. */
+ EXTR *extern_tab;
+ /* Size of extern_tab. */
+ int extern_count;
enum language pst_language;
};
+#define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private)
+#define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx)
+#define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd)
+#define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap)
+#define DEBUG_INFO(p) (PST_PRIVATE(p)->debug_info)
+#define PENDING_LIST(p) (PST_PRIVATE(p)->pending_list)
+\f
/* Things we import explicitly from other modules */
extern int info_verbose;