* 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:
Jim Kingdon 1994-09-14 22:45:49 +00:00
parent 809ee7e036
commit f69ecb9c9a
4 changed files with 40 additions and 14 deletions

View File

@ -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)
* gdbtk.tcl: Add ref counts to breakpoint tags.

View File

@ -898,6 +898,7 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
long dynrel_count;
arelent **dynrels;
CORE_ADDR sym_value;
char *name;
/* 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
@ -960,8 +961,12 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
if (sym->flags & BSF_GLOBAL)
type |= N_EXT;
record_minimal_symbol ((char *) bfd_asymbol_name (sym), sym_value,
type, objfile);
name = (char *) bfd_asymbol_name (sym);
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;
}
prim_record_minimal_symbol (bfd_asymbol_name (*rel->sym_ptr_ptr),
address,
mst_solib_trampoline,
objfile);
name = bfd_asymbol_name (*rel->sym_ptr_ptr);
prim_record_minimal_symbol
(obsavestring (name, strlen (name), &objfile -> symbol_obstack),
address,
mst_solib_trampoline,
objfile);
}
do_cleanups (back_to);

View File

@ -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'),
valaddr points a ptr to VALUE_LITERAL_DATA(value). */
/* First dereference valaddr. */
straddr = * (CORE_ADDR *) valaddr;
/* First dereference valaddr. This relies on valaddr pointing to the
aligner union of a struct value (so we are now fetching the
literal_data pointer from that union). FIXME: Is this always
true. */
straddr = * (char **) valaddr;
if (straddr)
{
len = TYPE_LENGTH (type);

View File

@ -1373,9 +1373,12 @@ function_entry_point:
breakpoints, using malloc, etc). On the other side, this is
consistient with gdb's behaviour on a SUN platform. */
/* Trying to prefer *real* function entry over its trampoline,
by assigning `mst_solib_trampoline' type to trampoline entries
fails. Gdb treats those entries as chars. FIXME. */
/* FIXME: I think this code is using "<trampoline>" instead of
the real name because there didn't used to be a way to prefer
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
this vector to get an idea about function address boundaries. */
@ -1386,7 +1389,7 @@ function_entry_point:
#else
/* 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. */
RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value,