aboutsummaryrefslogtreecommitdiff
path: root/gdb/partial-stab.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-06-13 06:39:27 +0000
committerJohn Gilmore <gnu@cygnus>1992-06-13 06:39:27 +0000
commit9342ecb9445e97793a516e97eff233e991b9d84d (patch)
treea81cad811d3c4efa6a22d155fcd1be94e8f5976e /gdb/partial-stab.h
parent609f87d4c94e0a0f897727701ede20f46af7fa1b (diff)
downloadgdb-9342ecb9445e97793a516e97eff233e991b9d84d.zip
gdb-9342ecb9445e97793a516e97eff233e991b9d84d.tar.gz
gdb-9342ecb9445e97793a516e97eff233e991b9d84d.tar.bz2
* dbxread.c: Add symbol_size to struct dbx_symfile_info.
Add symbol_size and file offsets to struct symloc. Add static symbol_table_offset, string_table_offset, file_string_table_offset, next_file_string_table_offset, last_function_name. (add_old_header_file): Convert error() to complain()t. (dbx_symfile_read): Get symbol size via the objfile. Also get symbol_table_offset. (dbx_symfile_init): Record symbol size and count via the objfile. (dbx_next_symbol_text): Always add file_string_table_offset when accessing string table. (read_dbx_symtab): Initialize file_string_table_offset to 0. (SET_NAMESTRING): Use the offset. (end_psymtab): Large kludge to determine addresses where source files start and end (for the psymtab header). (psymtab_to_symtab_1): Set file_string_table_offset before reading. Get this, symbol size, and symbol offset, from psymtab. (read_ofile_symtab): Don't back up one symbol for Solaris2. Patch up last_source_start_addr if zero in N_SO. (process_one_symbol): Add variable function_start_offset. ( "", N_FUN, N_LBRAC, N_RBRAC, N_SLINE): Add ifdef for BLOCK_ADDRESS_FUNCTION_RELATIVE. ( "", N_OBJ, N_OPT): Ignore. (elfstab_build_psymtabs): New function to read stabs out of an ELF file. * Makefile.in: Accept $(BISON) even though we really want $(YACC). (gdb): use GLOBAL_CFLAGS when linking, too. * partial-stab.h (N_UNDF): Deal with Sol2 relative stringtab offsets. (N_OBJ, N_OPT): Ignore. ('f', 'F'): Save last function name. * symfile.h: Prototype elfstab_build_psymtabs. * symfile.c: Add almost-OK debug versions of add_psymbol_*to_list. * xm-sysv4.h: Add <limits.h> to avoid conflicting defns in defs.h.
Diffstat (limited to 'gdb/partial-stab.h')
-rw-r--r--gdb/partial-stab.h43
1 files changed, 42 insertions, 1 deletions
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index 554fe1a..d9d757f 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -134,9 +134,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif /* DBXREAD_ONLY */
continue; /* Just undefined, not COMMON */
+ case N_UNDF:
+#ifdef DBXREAD_ONLY
+ if (processing_acc_compilation && bufp->n_strx == 1) {
+ /* deal with relative offsets in the string table
+ used in ELF+STAB under Solaris */
+ past_first_source_file = 1;
+ file_string_table_offset = next_file_string_table_offset;
+ next_file_string_table_offset =
+ file_string_table_offset + bufp->n_value;
+ if (next_file_string_table_offset < file_string_table_offset)
+ error ("string table offset backs up at %d", symnum);
+ /* FIXME -- replace error() with complaint. */
+ continue;
+ }
+#endif /* DBXREAD_ONLY */
+ continue;
+
/* Lots of symbol types we can just ignore. */
- case N_UNDF:
case N_ABS:
case N_BSS:
case N_NBDATA:
@@ -444,6 +460,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
continue;
case 'f':
+#ifdef DBXREAD_ONLY
+ /* Kludges for ELF/STABS with Sun ACC */
+ last_function_name = namestring;
+ if (pst->textlow == 0)
+ pst->textlow = CUR_SYMBOL_VALUE;
+#if 0
+ if (startup_file_end == 0)
+ startup_file_end = CUR_SYMBOL_VALUE;
+#endif
+ /* End kludge. */
+#endif /* DBXREAD_ONLY */
ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
VAR_NAMESPACE, LOC_BLOCK,
objfile->static_psymbols, CUR_SYMBOL_VALUE);
@@ -455,6 +482,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
FIXME, why did it used to ignore these? That broke
"i fun" on these functions. */
case 'F':
+#ifdef DBXREAD_ONLY
+ /* Kludges for ELF/STABS with Sun ACC */
+ last_function_name = namestring;
+ if (pst->textlow == 0)
+ pst->textlow = CUR_SYMBOL_VALUE;
+#if 0
+ if (startup_file_end == 0)
+ startup_file_end = CUR_SYMBOL_VALUE;
+#endif
+ /* End kludge. */
+#endif /* DBXREAD_ONLY */
ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
VAR_NAMESPACE, LOC_BLOCK,
objfile->global_psymbols, CUR_SYMBOL_VALUE);
@@ -567,6 +605,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
case N_LBRAC:
case N_NSYMS: /* Ultrix 4.0: symbol count */
case N_DEFD: /* GNU Modula-2 */
+
+ case N_OBJ: /* two useless types from Solaris */
+ case N_OPT:
/* These symbols aren't interesting; don't worry about them */
continue;