mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-07 18:01:18 +00:00
* 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.
This commit is contained in:
parent
5d672f2897
commit
f779e99f2a
@ -1,5 +1,40 @@
|
|||||||
Mon Jul 17 13:08:00 1995 Ian Lance Taylor <ian@cygnus.com>
|
Mon Jul 17 13:08:00 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
* remote-vx.c (vx_ops, vx_run_ops): Initialize new to_thread_alive
|
* remote-vx.c (vx_ops, vx_run_ops): Initialize new to_thread_alive
|
||||||
field.
|
field.
|
||||||
|
|
||||||
|
@ -55,7 +55,8 @@ struct stab_section_info {
|
|||||||
field of the objfile struct. */
|
field of the objfile struct. */
|
||||||
|
|
||||||
struct dbx_symfile_info {
|
struct dbx_symfile_info {
|
||||||
asection *text_sect; /* Text section accessor */
|
CORE_ADDR text_addr; /* Start of text section */
|
||||||
|
int text_size; /* Size of text section */
|
||||||
int symcount; /* How many symbols are there in the file */
|
int symcount; /* How many symbols are there in the file */
|
||||||
char *stringtab; /* The actual string table */
|
char *stringtab; /* The actual string table */
|
||||||
int stringtab_size; /* Its size */
|
int stringtab_size; /* Its size */
|
||||||
@ -66,7 +67,8 @@ struct dbx_symfile_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DBX_SYMFILE_INFO(o) ((struct dbx_symfile_info *)((o)->sym_stab_info))
|
#define DBX_SYMFILE_INFO(o) ((struct dbx_symfile_info *)((o)->sym_stab_info))
|
||||||
#define DBX_TEXT_SECT(o) (DBX_SYMFILE_INFO(o)->text_sect)
|
#define DBX_TEXT_ADDR(o) (DBX_SYMFILE_INFO(o)->text_addr)
|
||||||
|
#define DBX_TEXT_SIZE(o) (DBX_SYMFILE_INFO(o)->text_size)
|
||||||
#define DBX_SYMCOUNT(o) (DBX_SYMFILE_INFO(o)->symcount)
|
#define DBX_SYMCOUNT(o) (DBX_SYMFILE_INFO(o)->symcount)
|
||||||
#define DBX_STRINGTAB(o) (DBX_SYMFILE_INFO(o)->stringtab)
|
#define DBX_STRINGTAB(o) (DBX_SYMFILE_INFO(o)->stringtab)
|
||||||
#define DBX_STRINGTAB_SIZE(o) (DBX_SYMFILE_INFO(o)->stringtab_size)
|
#define DBX_STRINGTAB_SIZE(o) (DBX_SYMFILE_INFO(o)->stringtab_size)
|
||||||
|
@ -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,
|
/* Now that the symbol table data of the executable file are all in core,
|
||||||
process them and define symbols accordingly. */
|
process them and define symbols accordingly. */
|
||||||
read_os9k_psymtab (section_offsets, objfile,
|
read_os9k_psymtab (section_offsets, objfile,
|
||||||
bfd_section_vma (sym_bfd, DBX_TEXT_SECT (objfile)),
|
DBX_TEXT_ADDR (objfile),
|
||||||
bfd_section_size (sym_bfd, DBX_TEXT_SECT (objfile)));
|
DBX_TEXT_SIZE (objfile));
|
||||||
|
|
||||||
do_cleanups (back_to);
|
do_cleanups (back_to);
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ os9k_symfile_init (objfile)
|
|||||||
char dbgname[512], stbname[512];
|
char dbgname[512], stbname[512];
|
||||||
FILE *symfile = 0;
|
FILE *symfile = 0;
|
||||||
FILE *minfile = 0;
|
FILE *minfile = 0;
|
||||||
|
asection *text_sect;
|
||||||
|
|
||||||
strcpy(dbgname, name);
|
strcpy(dbgname, name);
|
||||||
strcat(dbgname, ".dbg");
|
strcat(dbgname, ".dbg");
|
||||||
@ -411,9 +411,11 @@ os9k_symfile_init (objfile)
|
|||||||
xmmalloc (objfile -> md, sizeof (struct dbx_symfile_info));
|
xmmalloc (objfile -> md, sizeof (struct dbx_symfile_info));
|
||||||
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
|
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
|
||||||
|
|
||||||
DBX_TEXT_SECT (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
|
text_sect = bfd_get_section_by_name (sym_bfd, ".text");
|
||||||
if (!DBX_TEXT_SECT (objfile))
|
if (!text_sect)
|
||||||
error ("Can't find .text section in file");
|
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_SYMBOL_SIZE (objfile) = 0; /* variable size symbol */
|
||||||
DBX_SYMCOUNT (objfile) = 0; /* used to be bfd_get_symcount(sym_bfd) */
|
DBX_SYMCOUNT (objfile) = 0; /* used to be bfd_get_symcount(sym_bfd) */
|
||||||
|
@ -166,7 +166,19 @@ finish_global_stabs PARAMS ((struct objfile *objfile));
|
|||||||
|
|
||||||
EXTERN int os9k_stabs;
|
EXTERN int os9k_stabs;
|
||||||
|
|
||||||
/* Functions exported by dbxread.c. These are not in stabsread.h because
|
/* COFF files can have multiple .stab sections, if they are linked
|
||||||
|
using --split-by-reloc. This linked list is used to pass the
|
||||||
|
information into the functions in dbxread.c. */
|
||||||
|
struct stab_section_list
|
||||||
|
{
|
||||||
|
/* Next in list. */
|
||||||
|
struct stab_section_list *next;
|
||||||
|
|
||||||
|
/* Stab section. */
|
||||||
|
asection *section;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Functions exported by dbxread.c. These are not in stabsread.c because
|
||||||
they are only used by some stabs readers. */
|
they are only used by some stabs readers. */
|
||||||
|
|
||||||
extern struct partial_symtab *
|
extern struct partial_symtab *
|
||||||
@ -194,7 +206,8 @@ extern void coffstab_build_psymtabs
|
|||||||
PARAMS ((struct objfile *objfile,
|
PARAMS ((struct objfile *objfile,
|
||||||
struct section_offsets *section_offsets,
|
struct section_offsets *section_offsets,
|
||||||
int mainline,
|
int mainline,
|
||||||
file_ptr staboff, unsigned int stabsize,
|
CORE_ADDR textaddr, unsigned int textsize,
|
||||||
|
struct stab_section_list *stabs,
|
||||||
file_ptr stabstroffset,
|
file_ptr stabstroffset,
|
||||||
unsigned int stabstrsize));
|
unsigned int stabstrsize));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user