aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-04-26 17:14:52 +0000
committerStu Grossman <grossman@cygnus>1994-04-26 17:14:52 +0000
commita66e8382def5fdeb8e291748ce6f1f639a0a63f2 (patch)
tree0a94fe06ff61d6bee8e4f9c407b0f61d39045fe1 /gdb/stabsread.c
parentcde73501070130c57a352d07b9021a8fb0fa3227 (diff)
downloadgdb-a66e8382def5fdeb8e291748ce6f1f639a0a63f2.zip
gdb-a66e8382def5fdeb8e291748ce6f1f639a0a63f2.tar.gz
gdb-a66e8382def5fdeb8e291748ce6f1f639a0a63f2.tar.bz2
* dbxread.c (record_minimal_symbol): Record the section
associated with the symbol to make dynmaic relocation work. * (dbx_symfile_read, process_one_symbol): Fixes to work around Solaris brain-damage which don't apply to relocatable object files. * (stabsect_build_psymtabs): New routine to read stabs out of an arbitrarily named section. * nlmread.c (nlm_symtab_read): Read ALL syms from the NLM, not just globals. * (nlm_symfile_read): Call stabsect_build_psymtabs to read the stabs out of the nlm. * partial-stabs.h (cases 'f' & 'F'): Fixes to work around Solaris brain-damage which don't apply to relocatable object files. * remote.c (putpkt): Improve error reporting and error handling. * stabsread.c (define_symbol, scan_file_globals): Record section info in sym.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index c6e4d78..da4632f 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -33,6 +33,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "symfile.h"
#include "objfiles.h"
#include "aout/stab_gnu.h" /* We always use GNU stabs, not native */
+#include "libaout.h"
+#include "aout/aout64.h"
+#include "gdb-stabs.h"
#include "buildsym.h"
#include "complaints.h"
#include "demangle.h"
@@ -540,6 +543,19 @@ define_symbol (valu, string, desc, type, objfile)
obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
+ switch (type & N_TYPE)
+ {
+ case N_TEXT:
+ SYMBOL_SECTION(sym) = SECT_OFF_TEXT;
+ break;
+ case N_DATA:
+ SYMBOL_SECTION(sym) = SECT_OFF_DATA;
+ break;
+ case N_BSS:
+ SYMBOL_SECTION(sym) = SECT_OFF_BSS;
+ break;
+ }
+
if (processing_gcc_compilation)
{
/* GCC 2.x puts the line number in desc. SunOS apparently puts in the
@@ -3826,6 +3842,8 @@ scan_file_globals (objfile)
{
SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msymbol);
}
+
+ SYMBOL_SECTION (sym) = SYMBOL_SECTION (msymbol);
if (prev)
{