* dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),

mdebugread.c (struct symloc), hpread.c (struct symloc): Clean
	up comments.
This commit is contained in:
Jim Kingdon 1995-04-21 13:19:22 +00:00
parent 4c92f0648f
commit 989d9cbac8
5 changed files with 96 additions and 84 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -69,19 +69,37 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define SEEK_SET 0
#define SEEK_CUR 1
#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.
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.
struct symloc {
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. */
/* 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;
/* 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)
@ -91,15 +109,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
struct symloc {
int ldsymoff;
int ldsymlen;
int symbol_size;
int symbol_offset;
int string_offset;
int file_string_offset;
};
/* Macro to determine which symbols to ignore when reading the first symbol
of a file. Some machines override this definition. */
#ifndef IGNORE_SYMBOL
@ -2050,7 +2060,8 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
#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;

View File

@ -343,36 +343,29 @@ static CORE_ADDR baseaddr; /* Add to each symbol value */
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)

View File

@ -99,29 +99,31 @@ struct hpread_symfile_info
} \
else \
*NAMEP = (SYM)->dsfile.name + VT (OBJFILE)
/* 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 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).
struct symloc
{
/* The offset within the file symbol table of first local symbol for
this 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. */
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))
struct symloc
{
int ldsymoff;
int ldsymlen;
};
/* FIXME: Shouldn't this stuff be in a .h file somewhere? */
/* Nonzero means give verbose info on gdb action. */
extern int info_verbose;

View File

@ -97,14 +97,26 @@ typedef struct mips_extra_func_info {
#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
sym_read function to use when expanding a partial symbol table entry
to a full symbol table entry. */
/* 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. */
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;
/* 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)
@ -112,19 +124,7 @@ typedef struct mips_extra_func_info {
#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)
struct symloc
{
int fdr_idx;
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. */
enum language pst_language;
};
/* Things we import explicitly from other modules */
extern int info_verbose;