aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-04-21 13:19:22 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-04-21 13:19:22 +0000
commit989d9cbac846036a85f6c7160e3ee9a534d0cfc5 (patch)
tree801d0887c5b75e70645dccb0ede7742cd54abffa /gdb/dbxread.c
parent4c92f0648f8327a6e150832936112142fb7684ca (diff)
downloadgdb-989d9cbac846036a85f6c7160e3ee9a534d0cfc5.zip
gdb-989d9cbac846036a85f6c7160e3ee9a534d0cfc5.tar.gz
gdb-989d9cbac846036a85f6c7160e3ee9a534d0cfc5.tar.bz2
* dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),
mdebugread.c (struct symloc), hpread.c (struct symloc): Clean up comments.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c51
1 files changed, 31 insertions, 20 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index e779366..927a0e1 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -69,37 +69,47 @@ 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.
-
- 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)
+
+
/* 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;