mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 20:49:43 +00:00
* rs6000-tdep.c (find_toc_address): Revise comment.
* symfile.c, symfile.h (init_psymbol_list): New function; consolidate duplicated copies from os9kread.c, dbxread.c and dwarfread.c. * defs.h: Declare info_verbose. * xcoffread.c: Extensive changes to support psymtabs.
This commit is contained in:
parent
b297038d0b
commit
a367db8959
@ -1,3 +1,12 @@
|
||||
Sat May 13 13:34:18 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
|
||||
|
||||
* rs6000-tdep.c (find_toc_address): Revise comment.
|
||||
* symfile.c, symfile.h (init_psymbol_list): New function;
|
||||
consolidate duplicated copies from os9kread.c, dbxread.c
|
||||
and dwarfread.c.
|
||||
* defs.h: Declare info_verbose.
|
||||
* xcoffread.c: Extensive changes to support psymtabs.
|
||||
|
||||
Fri May 12 13:48:41 1995 Stu Grossman (grossman@andros.cygnus.com)
|
||||
|
||||
* cpu32bug-rom.c remote-est.c rom68k-rom.c: Update line_term element.
|
||||
|
@ -246,9 +246,6 @@ add_bincl_to_list PARAMS ((struct partial_symtab *, char *, int));
|
||||
static void
|
||||
init_bincl_list PARAMS ((int, struct objfile *));
|
||||
|
||||
static void
|
||||
init_psymbol_list PARAMS ((struct objfile *));
|
||||
|
||||
static char *
|
||||
dbx_next_symbol_text PARAMS ((void));
|
||||
|
||||
@ -558,8 +555,10 @@ dbx_symfile_read (objfile, section_offsets, mainline)
|
||||
perror_with_name (objfile->name);
|
||||
|
||||
/* If we are reinitializing, or if we have never loaded syms yet, init */
|
||||
if (mainline || objfile->global_psymbols.size == 0 || objfile->static_psymbols.size == 0)
|
||||
init_psymbol_list (objfile);
|
||||
if (mainline
|
||||
|| objfile->global_psymbols.size == 0
|
||||
|| objfile->static_psymbols.size == 0)
|
||||
init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
|
||||
|
||||
symbol_size = DBX_SYMBOL_SIZE (objfile);
|
||||
symbol_table_offset = DBX_SYMTAB_OFFSET (objfile);
|
||||
@ -749,9 +748,11 @@ static char *last_function_name;
|
||||
|
||||
/* The address in memory of the string table of the object file we are
|
||||
reading (which might not be the "main" object file, but might be a
|
||||
shared library or some other dynamically loaded thing). This is set
|
||||
by read_dbx_symtab when building psymtabs, and by read_ofile_symtab
|
||||
when building symtabs, and is used only by next_symbol_text. */
|
||||
shared library or some other dynamically loaded thing). This is
|
||||
set by read_dbx_symtab when building psymtabs, and by
|
||||
read_ofile_symtab when building symtabs, and is used only by
|
||||
next_symbol_text. FIXME: If that is true, we don't need it when
|
||||
building psymtabs, right? */
|
||||
static char *stringtab_global;
|
||||
|
||||
/* Refill the symbol table input buffer
|
||||
@ -803,30 +804,6 @@ dbx_next_symbol_text ()
|
||||
+ file_string_table_offset;
|
||||
}
|
||||
|
||||
/* Initializes storage for all of the partial symbols that will be
|
||||
created by read_dbx_symtab and subsidiaries. */
|
||||
|
||||
static void
|
||||
init_psymbol_list (objfile)
|
||||
struct objfile *objfile;
|
||||
{
|
||||
/* Free any previously allocated psymbol lists. */
|
||||
if (objfile -> global_psymbols.list)
|
||||
mfree (objfile -> md, (PTR)objfile -> global_psymbols.list);
|
||||
if (objfile -> static_psymbols.list)
|
||||
mfree (objfile -> md, (PTR)objfile -> static_psymbols.list);
|
||||
|
||||
/* Current best guess is that there are approximately a twentieth
|
||||
of the total symbols (in a debugging file) are global or static
|
||||
oriented symbols */
|
||||
objfile -> global_psymbols.size = DBX_SYMCOUNT (objfile) / 10;
|
||||
objfile -> static_psymbols.size = DBX_SYMCOUNT (objfile) / 10;
|
||||
objfile -> global_psymbols.next = objfile -> global_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> global_psymbols.size * sizeof (struct partial_symbol));
|
||||
objfile -> static_psymbols.next = objfile -> static_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> static_psymbols.size * sizeof (struct partial_symbol));
|
||||
}
|
||||
|
||||
/* Initialize the list of bincls to contain none and have some
|
||||
allocated. */
|
||||
|
||||
|
@ -473,9 +473,6 @@ scan_compilation_units PARAMS ((char *, char *, file_ptr,
|
||||
static void
|
||||
add_partial_symbol PARAMS ((struct dieinfo *, struct objfile *));
|
||||
|
||||
static void
|
||||
init_psymbol_list PARAMS ((struct objfile *, int));
|
||||
|
||||
static void
|
||||
basicdieinfo PARAMS ((struct dieinfo *, char *, struct objfile *));
|
||||
|
||||
@ -2473,54 +2470,6 @@ dwarf_psymtab_to_symtab (pst)
|
||||
|
||||
/*
|
||||
|
||||
LOCAL FUNCTION
|
||||
|
||||
init_psymbol_list -- initialize storage for partial symbols
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
static void init_psymbol_list (struct objfile *objfile, int total_symbols)
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
Initializes storage for all of the partial symbols that will be
|
||||
created by dwarf_build_psymtabs and subsidiaries.
|
||||
*/
|
||||
|
||||
static void
|
||||
init_psymbol_list (objfile, total_symbols)
|
||||
struct objfile *objfile;
|
||||
int total_symbols;
|
||||
{
|
||||
/* Free any previously allocated psymbol lists. */
|
||||
|
||||
if (objfile -> global_psymbols.list)
|
||||
{
|
||||
mfree (objfile -> md, (PTR)objfile -> global_psymbols.list);
|
||||
}
|
||||
if (objfile -> static_psymbols.list)
|
||||
{
|
||||
mfree (objfile -> md, (PTR)objfile -> static_psymbols.list);
|
||||
}
|
||||
|
||||
/* Current best guess is that there are approximately a twentieth
|
||||
of the total symbols (in a debugging file) are global or static
|
||||
oriented symbols */
|
||||
|
||||
objfile -> global_psymbols.size = total_symbols / 10;
|
||||
objfile -> static_psymbols.size = total_symbols / 10;
|
||||
objfile -> global_psymbols.next =
|
||||
objfile -> global_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> global_psymbols.size
|
||||
* sizeof (struct partial_symbol));
|
||||
objfile -> static_psymbols.next =
|
||||
objfile -> static_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> static_psymbols.size
|
||||
* sizeof (struct partial_symbol));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
LOCAL FUNCTION
|
||||
|
||||
add_enum_psymbol -- add enumeration members to partial symbol table
|
||||
|
@ -143,9 +143,6 @@ static void
|
||||
read_os9k_psymtab PARAMS ((struct section_offsets *, struct objfile *,
|
||||
CORE_ADDR, int));
|
||||
|
||||
static void
|
||||
init_psymbol_list PARAMS ((struct objfile *));
|
||||
|
||||
static int
|
||||
fill_sym PARAMS ((FILE *, bfd *));
|
||||
|
||||
@ -340,7 +337,7 @@ os9k_symfile_read (objfile, section_offsets, mainline)
|
||||
/* If we are reinitializing, or if we have never loaded syms yet, init */
|
||||
if (mainline || objfile->global_psymbols.size == 0 ||
|
||||
objfile->static_psymbols.size == 0)
|
||||
init_psymbol_list (objfile);
|
||||
init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
|
||||
|
||||
pending_blocks = 0;
|
||||
back_to = make_cleanup (really_free_pendings, 0);
|
||||
@ -550,30 +547,6 @@ char *p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Initializes storage for all of the partial symbols that will be
|
||||
created by read_dbx_symtab and subsidiaries. */
|
||||
|
||||
static void
|
||||
init_psymbol_list (objfile)
|
||||
struct objfile *objfile;
|
||||
{
|
||||
/* Free any previously allocated psymbol lists. */
|
||||
if (objfile -> global_psymbols.list)
|
||||
mfree (objfile -> md, (PTR)objfile -> global_psymbols.list);
|
||||
if (objfile -> static_psymbols.list)
|
||||
mfree (objfile -> md, (PTR)objfile -> static_psymbols.list);
|
||||
|
||||
/* Current best guess is that there are approximately a twentieth
|
||||
of the total symbols (in a debugging file) are global or static
|
||||
oriented symbols */
|
||||
objfile -> global_psymbols.size = DBX_SYMCOUNT (objfile) / 10;
|
||||
objfile -> static_psymbols.size = DBX_SYMCOUNT (objfile) / 10;
|
||||
objfile -> global_psymbols.next = objfile -> global_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> global_psymbols.size * sizeof (struct partial_symbol));
|
||||
objfile -> static_psymbols.next = objfile -> static_psymbols.list = (struct partial_symbol *)
|
||||
xmmalloc (objfile -> md, objfile -> static_psymbols.size * sizeof (struct partial_symbol));
|
||||
}
|
||||
|
||||
/* Given pointers to an a.out symbol table in core containing dbx
|
||||
style data, setup partial_symtab's describing each source file for
|
||||
which debugging information is available.
|
||||
|
@ -1199,10 +1199,12 @@ add_text_to_loadinfo (textaddr, dataaddr)
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: This assumes that the "textorg" and "dataorg" elements
|
||||
/* Note that this assumes that the "textorg" and "dataorg" elements
|
||||
of a member of this array are correlated with the "toc_offset"
|
||||
element of the same member. But they are sequentially assigned in wildly
|
||||
different places, and probably there is no correlation. FIXME! */
|
||||
element of the same member. This is taken care of because the loops
|
||||
which assign the former (in xcoff_relocate_symtab or xcoff_relocate_core)
|
||||
and the latter (in scan_xcoff_symtab, via vmap_symtab, in vmap_ldinfo
|
||||
or xcoff_relocate_core) traverse the same objfiles in the same order. */
|
||||
|
||||
static CORE_ADDR
|
||||
find_toc_address (pc)
|
||||
|
1758
gdb/xcoffread.c
1758
gdb/xcoffread.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user