* printcmd.c (address_info): Use fprintf_symbol_filtered

to print the symbol name.

	* stabsread.c (define_symbol): Handle cfront lossage for
	struct/union/enums and typedefs.

	* partial-stab.h (case N_BINCL): Update psymtab_language
	as appropriate when changing subfiles.
	(case N_SOL): Update psymtab_language as appropriate when
	changing subfiles.  Add typedef for structs, unions, and enums
	when processing C++ files.
This commit is contained in:
Jeff Law
1993-11-11 23:27:21 +00:00
parent 3e80841e27
commit 91f8701603
4 changed files with 132 additions and 56 deletions

View File

@@ -883,22 +883,32 @@ address_info (exp, from_tty)
{
if (is_a_field_of_this)
{
printf_unfiltered ("Symbol \"%s\" is a field of the local class variable `this'\n", exp);
printf_unfiltered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
printf_unfiltered ("\" is a field of the local class variable `this'\n");
return;
}
msymbol = lookup_minimal_symbol (exp, (struct objfile *) NULL);
if (msymbol != NULL)
printf_unfiltered ("Symbol \"%s\" is at %s in a file compiled without debugging.\n",
exp,
local_hex_string((unsigned long) SYMBOL_VALUE_ADDRESS (msymbol)));
{
printf_unfiltered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
printf_unfiltered ("\" is at %s in a file compiled without debugging.\n",
local_hex_string((unsigned long) SYMBOL_VALUE_ADDRESS (msymbol)));
}
else
error ("No symbol \"%s\" in current context.", exp);
return;
}
printf_unfiltered ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
printf_unfiltered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, SYMBOL_NAME (sym),
current_language->la_language, DMGL_ANSI);
printf_unfiltered ("\" is ", SYMBOL_NAME (sym));
val = SYMBOL_VALUE (sym);
basereg = SYMBOL_BASEREG (sym);