aboutsummaryrefslogtreecommitdiff
path: root/gdb/os9kread.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-07-17 17:33:37 +0000
committerIan Lance Taylor <ian@airs.com>1995-07-17 17:33:37 +0000
commitf779e99f2ab25060486dc11ab2fcddba0cacf918 (patch)
tree2785b2ab5eeb5b438b8baeb8b8342e93a325b707 /gdb/os9kread.c
parent5d672f28973ceaed88fb58ddf75f0a8e8149e09b (diff)
downloadgdb-f779e99f2ab25060486dc11ab2fcddba0cacf918.zip
gdb-f779e99f2ab25060486dc11ab2fcddba0cacf918.tar.gz
gdb-f779e99f2ab25060486dc11ab2fcddba0cacf918.tar.bz2
* stabsread.h (struct stab_section_list): Define.
(coffstab_build_psymtabs): Remove staboff and stabsize parameters. Add textaddr, textsize, and stabs parameters. * gdb-stabs.h (struct dbx_symfile_info): Remove text_sect field. Add text_addr and text_size fields. (DBX_TEXT_SECT): Don't define. (DBX_TEXT_ADDR, DBX_TEXT_SIZE): Define. * coffread.c: Include <ctype.h>. (struct coff_symfile_info): Remove stabsect and stabindexsect fields. Add textaddr, textsize, and stabsects fields. (coff_locate_sections): Record the address of the .text section, and total the sizes of all sections with names beginning with ".text". Don't bother to record a .stab.index section (COFF doesn't use them). Make a linked list of all sections with names beginning with ".stab". (coff_symfile_read): Adjust call to coffstab_build_psymtabs for new parameters. * dbxread.c (dbx_symfile_read): Use DBX_TEXT_ADDR and DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT. (dbx_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not DBX_TEXT_SECT. (elfstab_build_psymtabs): Likewise. (stabsect_build_psymtabs): Likewise. (symbuf_sections, symbuf_left, symbuf_read): New static variables. (fill_symbuf): If symbuf_sections is not NULL, read symbols from multiple sections. (coffstab_build_psymtabs): Remove staboffset and stabsize parameters. Add textaddr, textsize, and stabsects parameters. Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not DBX_TEXT_SECT. Handle multiple stabs sections. * os9kread.c (os9k_symfile_read): Use DBX_TEXT_ADDR and DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT. (os9k_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not DBX_TEXT_SECT. PR 7241.
Diffstat (limited to 'gdb/os9kread.c')
-rw-r--r--gdb/os9kread.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 155ea93..6a91cd6 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -348,8 +348,8 @@ os9k_symfile_read (objfile, section_offsets, mainline)
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
read_os9k_psymtab (section_offsets, objfile,
- bfd_section_vma (sym_bfd, DBX_TEXT_SECT (objfile)),
- bfd_section_size (sym_bfd, DBX_TEXT_SECT (objfile)));
+ DBX_TEXT_ADDR (objfile),
+ DBX_TEXT_SIZE (objfile));
do_cleanups (back_to);
}
@@ -389,7 +389,7 @@ os9k_symfile_init (objfile)
char dbgname[512], stbname[512];
FILE *symfile = 0;
FILE *minfile = 0;
-
+ asection *text_sect;
strcpy(dbgname, name);
strcat(dbgname, ".dbg");
@@ -411,9 +411,11 @@ os9k_symfile_init (objfile)
xmmalloc (objfile -> md, sizeof (struct dbx_symfile_info));
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
- DBX_TEXT_SECT (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
- if (!DBX_TEXT_SECT (objfile))
+ text_sect = bfd_get_section_by_name (sym_bfd, ".text");
+ if (!text_sect)
error ("Can't find .text section in file");
+ DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
+ DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
DBX_SYMBOL_SIZE (objfile) = 0; /* variable size symbol */
DBX_SYMCOUNT (objfile) = 0; /* used to be bfd_get_symcount(sym_bfd) */