* xcoffread.c (read_xcoff_symtab): Fix obsolete comment about
mst_solib_trampoline. * f-valprint.c (f_val_print): Change cast of valaddr from CORE_ADDR * to char **, since that is how it is used. * dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names using obsavestring, and pass that to prim_record_minimal_symbol. Having the objfile point to bfd_asymbol_name directly doesn't work if we save and restore a mapped symbol file.
This commit is contained in:
parent
809ee7e036
commit
f69ecb9c9a
|
@ -1,3 +1,16 @@
|
||||||
|
Wed Sep 14 14:26:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* xcoffread.c (read_xcoff_symtab): Fix obsolete comment about
|
||||||
|
mst_solib_trampoline.
|
||||||
|
|
||||||
|
* f-valprint.c (f_val_print): Change cast of valaddr from
|
||||||
|
CORE_ADDR * to char **, since that is how it is used.
|
||||||
|
|
||||||
|
* dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names
|
||||||
|
using obsavestring, and pass that to prim_record_minimal_symbol.
|
||||||
|
Having the objfile point to bfd_asymbol_name directly doesn't work
|
||||||
|
if we save and restore a mapped symbol file.
|
||||||
|
|
||||||
Wed Sep 14 00:55:26 1994 Stu Grossman (grossman@cygnus.com)
|
Wed Sep 14 00:55:26 1994 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
* gdbtk.tcl: Add ref counts to breakpoint tags.
|
* gdbtk.tcl: Add ref counts to breakpoint tags.
|
||||||
|
|
|
@ -898,6 +898,7 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
|
||||||
long dynrel_count;
|
long dynrel_count;
|
||||||
arelent **dynrels;
|
arelent **dynrels;
|
||||||
CORE_ADDR sym_value;
|
CORE_ADDR sym_value;
|
||||||
|
char *name;
|
||||||
|
|
||||||
/* Check that the symbol file has dynamic symbols that we know about.
|
/* Check that the symbol file has dynamic symbols that we know about.
|
||||||
bfd_arch_unknown can happen if we are reading a sun3 symbol file
|
bfd_arch_unknown can happen if we are reading a sun3 symbol file
|
||||||
|
@ -960,8 +961,12 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
|
||||||
if (sym->flags & BSF_GLOBAL)
|
if (sym->flags & BSF_GLOBAL)
|
||||||
type |= N_EXT;
|
type |= N_EXT;
|
||||||
|
|
||||||
record_minimal_symbol ((char *) bfd_asymbol_name (sym), sym_value,
|
name = (char *) bfd_asymbol_name (sym);
|
||||||
type, objfile);
|
record_minimal_symbol
|
||||||
|
(obsavestring (name, strlen (name), &objfile -> symbol_obstack),
|
||||||
|
sym_value,
|
||||||
|
type,
|
||||||
|
objfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1013,10 +1018,12 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
prim_record_minimal_symbol (bfd_asymbol_name (*rel->sym_ptr_ptr),
|
name = bfd_asymbol_name (*rel->sym_ptr_ptr);
|
||||||
address,
|
prim_record_minimal_symbol
|
||||||
mst_solib_trampoline,
|
(obsavestring (name, strlen (name), &objfile -> symbol_obstack),
|
||||||
objfile);
|
address,
|
||||||
|
mst_solib_trampoline,
|
||||||
|
objfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_cleanups (back_to);
|
do_cleanups (back_to);
|
||||||
|
|
|
@ -455,10 +455,13 @@ f_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
|
||||||
and for straight literals (i.e. of the form 'hello world'),
|
and for straight literals (i.e. of the form 'hello world'),
|
||||||
valaddr points a ptr to VALUE_LITERAL_DATA(value). */
|
valaddr points a ptr to VALUE_LITERAL_DATA(value). */
|
||||||
|
|
||||||
/* First dereference valaddr. */
|
/* First dereference valaddr. This relies on valaddr pointing to the
|
||||||
|
aligner union of a struct value (so we are now fetching the
|
||||||
straddr = * (CORE_ADDR *) valaddr;
|
literal_data pointer from that union). FIXME: Is this always
|
||||||
|
true. */
|
||||||
|
|
||||||
|
straddr = * (char **) valaddr;
|
||||||
|
|
||||||
if (straddr)
|
if (straddr)
|
||||||
{
|
{
|
||||||
len = TYPE_LENGTH (type);
|
len = TYPE_LENGTH (type);
|
||||||
|
|
|
@ -1373,9 +1373,12 @@ function_entry_point:
|
||||||
breakpoints, using malloc, etc). On the other side, this is
|
breakpoints, using malloc, etc). On the other side, this is
|
||||||
consistient with gdb's behaviour on a SUN platform. */
|
consistient with gdb's behaviour on a SUN platform. */
|
||||||
|
|
||||||
/* Trying to prefer *real* function entry over its trampoline,
|
/* FIXME: I think this code is using "<trampoline>" instead of
|
||||||
by assigning `mst_solib_trampoline' type to trampoline entries
|
the real name because there didn't used to be a way to prefer
|
||||||
fails. Gdb treats those entries as chars. FIXME. */
|
mst_text symbols over mst_solib_trampoline symbols (in fact,
|
||||||
|
it was using mst_unknown because mst_solib_trampoline didn't
|
||||||
|
exist yet). Using the real name would cause better output
|
||||||
|
from print_address. */
|
||||||
|
|
||||||
/* Recording this entry is necessary. Single stepping relies on
|
/* Recording this entry is necessary. Single stepping relies on
|
||||||
this vector to get an idea about function address boundaries. */
|
this vector to get an idea about function address boundaries. */
|
||||||
|
@ -1386,7 +1389,7 @@ function_entry_point:
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* record trampoline code entries as mst_solib_trampoline symbol.
|
/* record trampoline code entries as mst_solib_trampoline symbol.
|
||||||
When we lookup mst symbols, we will choose mst_text over
|
When we lookup minimal symbols, we will choose mst_text over
|
||||||
mst_solib_trampoline. */
|
mst_solib_trampoline. */
|
||||||
|
|
||||||
RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value,
|
RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value,
|
||||||
|
|
Loading…
Reference in New Issue