aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-02-20 17:17:25 +0000
committerDavid Carlton <carlton@bactrian.org>2003-02-20 17:17:25 +0000
commitde5ad195ef7f521cd021746f49f8c4c5c64e7872 (patch)
treeebe0ce7efe28150de24e5a0ff8fa35bb0f4abaff
parentf796e4be8018a412bc738614a70e6459518b7a5b (diff)
downloadgdb-de5ad195ef7f521cd021746f49f8c4c5c64e7872.zip
gdb-de5ad195ef7f521cd021746f49f8c4c5c64e7872.tar.gz
gdb-de5ad195ef7f521cd021746f49f8c4c5c64e7872.tar.bz2
2003-02-20 David Carlton <carlton@math.stanford.edu>
* symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME; expand comment. * ada-lang.c (user_select_syms, ada_finish_decode_line_1): Replace SYMBOL_PRINT_NAME with SYMBOL_SOURCE_NAME. * ada-typeprint.c (ada_typedef_print): Ditto. * ax-gdb.c (gen_var_ref): Ditto. * breakpoint.c (print_one_breakpoint): Ditto. * buildsym.c (finish_block): Ditto. * c-valprint.c (c_val_print): Ditto. * expprint.c (print_subexp): Ditto. * findvar.c (locate_var_value): Ditto. * infcmd.c (jump_command): Ditto. * linespec.c (decode_line_2, decode_compound): Ditto. * maint.c (maintenance_translate_address): Ditto. * objc-lang.c (compare_selectors, compare_classes): Ditto. * printcmd.c (build_address_symbolic, sym_info, print_frame_args): Ditto. * p-valprint.c (pascal_val_print): Ditto. * stabsread.c (define_symbol): Ditto. * stack.c (print_frame, frame_info, print_block_frame_locals) (print_frame_arg_vars, return_command): Ditto. * symfile.c (compare_symbols, compare_psymbols): Ditto. * symmisc.c (print_symbol): Ditto. * symtab.c (lookup_partial_symbol, lookup_block_symbol) (compare_search_syms, print_symbol_info, print_msymbol_info) (rbreak_command): Ditto. * tracepoint.c (tracepoints_info): Ditto. * typeprint.c (typedef_print): Ditto. * valops.c (value_of_variable, hand_function_call): Ditto. * cli/cli-cmds.c (edit_command, list_command): Ditto. * ada-typeprint.c: Update Copyright. * infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto. * tracepoint.c, cli/cli-cmds.c: Ditto.
-rw-r--r--gdb/ChangeLog36
-rw-r--r--gdb/ada-lang.c15
-rw-r--r--gdb/ada-typeprint.c7
-rw-r--r--gdb/ax-gdb.c8
-rw-r--r--gdb/breakpoint.c2
-rw-r--r--gdb/buildsym.c4
-rw-r--r--gdb/c-valprint.c2
-rw-r--r--gdb/cli/cli-cmds.c6
-rw-r--r--gdb/expprint.c6
-rw-r--r--gdb/findvar.c8
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/linespec.c6
-rw-r--r--gdb/maint.c2
-rw-r--r--gdb/objc-lang.c10
-rw-r--r--gdb/p-valprint.c4
-rw-r--r--gdb/printcmd.c10
-rw-r--r--gdb/stabsread.c6
-rw-r--r--gdb/stack.c16
-rw-r--r--gdb/symfile.c6
-rw-r--r--gdb/symmisc.c10
-rw-r--r--gdb/symtab.c20
-rw-r--r--gdb/symtab.h15
-rw-r--r--gdb/tracepoint.c4
-rw-r--r--gdb/typeprint.c6
-rw-r--r--gdb/valops.c10
25 files changed, 132 insertions, 91 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ebb9784..bdc87b4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,39 @@
+2003-02-20 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME;
+ expand comment.
+ * ada-lang.c (user_select_syms, ada_finish_decode_line_1): Replace
+ SYMBOL_PRINT_NAME with SYMBOL_SOURCE_NAME.
+ * ada-typeprint.c (ada_typedef_print): Ditto.
+ * ax-gdb.c (gen_var_ref): Ditto.
+ * breakpoint.c (print_one_breakpoint): Ditto.
+ * buildsym.c (finish_block): Ditto.
+ * c-valprint.c (c_val_print): Ditto.
+ * expprint.c (print_subexp): Ditto.
+ * findvar.c (locate_var_value): Ditto.
+ * infcmd.c (jump_command): Ditto.
+ * linespec.c (decode_line_2, decode_compound): Ditto.
+ * maint.c (maintenance_translate_address): Ditto.
+ * objc-lang.c (compare_selectors, compare_classes): Ditto.
+ * printcmd.c (build_address_symbolic, sym_info, print_frame_args):
+ Ditto.
+ * p-valprint.c (pascal_val_print): Ditto.
+ * stabsread.c (define_symbol): Ditto.
+ * stack.c (print_frame, frame_info, print_block_frame_locals)
+ (print_frame_arg_vars, return_command): Ditto.
+ * symfile.c (compare_symbols, compare_psymbols): Ditto.
+ * symmisc.c (print_symbol): Ditto.
+ * symtab.c (lookup_partial_symbol, lookup_block_symbol)
+ (compare_search_syms, print_symbol_info, print_msymbol_info)
+ (rbreak_command): Ditto.
+ * tracepoint.c (tracepoints_info): Ditto.
+ * typeprint.c (typedef_print): Ditto.
+ * valops.c (value_of_variable, hand_function_call): Ditto.
+ * cli/cli-cmds.c (edit_command, list_command): Ditto.
+ * ada-typeprint.c: Update Copyright.
+ * infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto.
+ * tracepoint.c, cli/cli-cmds.c: Ditto.
+
2003-02-20 Kevin Buettner <kevinb@redhat.com>
* frame.c (generic_unwind_get_saved_register): Make non-static.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index eb4ccbe..d5323a1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1,5 +1,6 @@
/* Ada language support routines for GDB, the GNU debugger. Copyright
- 1992, 1993, 1994, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -2613,7 +2614,7 @@ user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
struct symtab_and_line sal = find_function_start_sal (syms[i], 1);
printf_unfiltered ("[%d] %s at %s:%d\n",
i + first_choice,
- SYMBOL_SOURCE_NAME (syms[i]),
+ SYMBOL_PRINT_NAME (syms[i]),
sal.symtab == NULL
? "<no source file available>"
: sal.symtab->filename, sal.line);
@@ -2630,28 +2631,28 @@ user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
if (SYMBOL_LINE (syms[i]) != 0 && symtab != NULL)
printf_unfiltered ("[%d] %s at %s:%d\n",
i + first_choice,
- SYMBOL_SOURCE_NAME (syms[i]),
+ SYMBOL_PRINT_NAME (syms[i]),
symtab->filename, SYMBOL_LINE (syms[i]));
else if (is_enumeral && TYPE_NAME (SYMBOL_TYPE (syms[i])) != NULL)
{
printf_unfiltered ("[%d] ", i + first_choice);
ada_print_type (SYMBOL_TYPE (syms[i]), NULL, gdb_stdout, -1, 0);
printf_unfiltered ("'(%s) (enumeral)\n",
- SYMBOL_SOURCE_NAME (syms[i]));
+ SYMBOL_PRINT_NAME (syms[i]));
}
else if (symtab != NULL)
printf_unfiltered (is_enumeral
? "[%d] %s in %s (enumeral)\n"
: "[%d] %s at %s:?\n",
i + first_choice,
- SYMBOL_SOURCE_NAME (syms[i]),
+ SYMBOL_PRINT_NAME (syms[i]),
symtab->filename);
else
printf_unfiltered (is_enumeral
? "[%d] %s (enumeral)\n"
: "[%d] %s at ?\n",
i + first_choice,
- SYMBOL_SOURCE_NAME (syms[i]));
+ SYMBOL_PRINT_NAME (syms[i]));
}
}
@@ -4473,7 +4474,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
for (i = 0; i < selected.nelts; i += 1)
(*canonical)[i] =
extended_canonical_line_spec (selected.sals[i],
- SYMBOL_SOURCE_NAME (symbols[i]));
+ SYMBOL_PRINT_NAME (symbols[i]));
}
discard_cleanups (old_chain);
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index c18aa85..1939354 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -1,5 +1,6 @@
/* Support for printing Ada types for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1997 Free Software Foundation, Inc.
+ Copyright 1986, 1988, 1989, 1991, 1997, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -124,8 +125,8 @@ ada_typedef_print (struct type *type, struct symbol *new,
struct ui_file *stream)
{
fprintf_filtered (stream, "type %.*s is ",
- ada_name_prefix_len (SYMBOL_SOURCE_NAME (new)),
- SYMBOL_SOURCE_NAME (new));
+ ada_name_prefix_len (SYMBOL_PRINT_NAME (new)),
+ SYMBOL_PRINT_NAME (new));
type_print (type, "", stream, 1);
}
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 319cf99..6527a48 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -579,7 +579,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
case LOC_TYPEDEF:
error ("Cannot compute value of typedef `%s'.",
- SYMBOL_SOURCE_NAME (var));
+ SYMBOL_PRINT_NAME (var));
break;
case LOC_BLOCK:
@@ -610,7 +610,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
struct minimal_symbol *msym
= lookup_minimal_symbol (SYMBOL_NAME (var), NULL, NULL);
if (!msym)
- error ("Couldn't resolve symbol `%s'.", SYMBOL_SOURCE_NAME (var));
+ error ("Couldn't resolve symbol `%s'.", SYMBOL_PRINT_NAME (var));
/* Push the address of the variable. */
ax_const_l (ax, SYMBOL_VALUE_ADDRESS (msym));
@@ -620,12 +620,12 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
case LOC_OPTIMIZED_OUT:
error ("The variable `%s' has been optimized out.",
- SYMBOL_SOURCE_NAME (var));
+ SYMBOL_PRINT_NAME (var));
break;
default:
error ("Cannot find value of botched symbol `%s'.",
- SYMBOL_SOURCE_NAME (var));
+ SYMBOL_PRINT_NAME (var));
break;
}
}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6a6eba3..5579df3 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3387,7 +3387,7 @@ print_one_breakpoint (struct breakpoint *b,
{
ui_out_text (uiout, "in ");
ui_out_field_string (uiout, "func",
- SYMBOL_SOURCE_NAME (sym));
+ SYMBOL_PRINT_NAME (sym));
ui_out_wrap_hint (uiout, wrap_indent);
ui_out_text (uiout, " at ");
}
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 3fbc8d1..15a59a0 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -395,7 +395,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
{
complaint (&symfile_complaints,
"block end address less than block start address in %s (patched it)",
- SYMBOL_SOURCE_NAME (symbol));
+ SYMBOL_PRINT_NAME (symbol));
}
else
{
@@ -429,7 +429,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
{
complaint (&symfile_complaints,
"inner block not inside outer block in %s",
- SYMBOL_SOURCE_NAME (symbol));
+ SYMBOL_PRINT_NAME (symbol));
}
else
{
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 53b07c6..66ee0a3 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -205,7 +205,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
(vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
{
fputs_filtered (" <", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (msymbol), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (msymbol), stream);
fputs_filtered (">", stream);
}
if (vt_address && vtblprint)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 85dd689..108329a 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1,6 +1,6 @@
/* GDB CLI commands.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -605,7 +605,7 @@ edit_command (char *arg, int from_tty)
{
print_address_numeric (sal.pc, 1, gdb_stdout);
printf_filtered (" is in ");
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), gdb_stdout);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
}
else
@@ -772,7 +772,7 @@ list_command (char *arg, int from_tty)
{
print_address_numeric (sal.pc, 1, gdb_stdout);
printf_filtered (" is in ");
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), gdb_stdout);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
}
else
diff --git a/gdb/expprint.c b/gdb/expprint.c
index b64c3c5..5f2032d 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -108,12 +108,12 @@ print_subexp (register struct expression *exp, register int *pos,
b = exp->elts[pc + 1].block;
if (b != NULL
&& BLOCK_FUNCTION (b) != NULL
- && SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)) != NULL)
+ && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)) != NULL)
{
- fputs_filtered (SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)), stream);
fputs_filtered ("::", stream);
}
- fputs_filtered (SYMBOL_SOURCE_NAME (exp->elts[pc + 2].symbol), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol), stream);
}
return;
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 577b8af..740d8d6 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -880,7 +880,7 @@ locate_var_value (register struct symbol *var, struct frame_info *frame)
lazy_value = read_var_value (var, frame);
if (lazy_value == 0)
- error ("Address of \"%s\" is unknown.", SYMBOL_SOURCE_NAME (var));
+ error ("Address of \"%s\" is unknown.", SYMBOL_PRINT_NAME (var));
if (VALUE_LAZY (lazy_value)
|| TYPE_CODE (type) == TYPE_CODE_FUNC)
@@ -901,7 +901,7 @@ locate_var_value (register struct symbol *var, struct frame_info *frame)
&& *REGISTER_NAME (VALUE_REGNO (lazy_value)) != '\0');
error("Address requested for identifier "
"\"%s\" which is in register $%s",
- SYMBOL_SOURCE_NAME (var),
+ SYMBOL_PRINT_NAME (var),
REGISTER_NAME (VALUE_REGNO (lazy_value)));
break;
@@ -910,13 +910,13 @@ locate_var_value (register struct symbol *var, struct frame_info *frame)
&& *REGISTER_NAME (VALUE_FRAME_REGNUM (lazy_value)) != '\0');
error("Address requested for identifier "
"\"%s\" which is in frame register $%s",
- SYMBOL_SOURCE_NAME (var),
+ SYMBOL_PRINT_NAME (var),
REGISTER_NAME (VALUE_FRAME_REGNUM (lazy_value)));
break;
default:
error ("Can't take address of \"%s\" which isn't an lvalue.",
- SYMBOL_SOURCE_NAME (var));
+ SYMBOL_PRINT_NAME (var));
break;
}
return 0; /* For lint -- never reached */
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 0f88d63..0bdfc6c 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1,6 +1,6 @@
/* Memory-access and commands for "inferior" process, for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -855,7 +855,7 @@ jump_command (char *arg, int from_tty)
if (fn != NULL && sfn != fn)
{
if (!query ("Line %d is not in `%s'. Jump anyway? ", sal.line,
- SYMBOL_SOURCE_NAME (fn)))
+ SYMBOL_PRINT_NAME (fn)))
{
error ("Not confirmed.");
/* NOTREACHED */
diff --git a/gdb/linespec.c b/gdb/linespec.c
index a4d4ab1..141f5bb 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -430,7 +430,7 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
values.sals[i] = find_function_start_sal (sym_arr[i], funfirstline);
printf_unfiltered ("[%d] %s at %s:%d\n",
(i + 2),
- SYMBOL_SOURCE_NAME (sym_arr[i]),
+ SYMBOL_PRINT_NAME (sym_arr[i]),
values.sals[i].symtab->filename,
values.sals[i].line);
}
@@ -1101,11 +1101,11 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
if (tmp[0] == '~')
cplusplus_error (saved_arg,
"the class `%s' does not have destructor defined\n",
- SYMBOL_SOURCE_NAME (sym_class));
+ SYMBOL_PRINT_NAME (sym_class));
else
cplusplus_error (saved_arg,
"the class %s does not have any method named %s\n",
- SYMBOL_SOURCE_NAME (sym_class), tmp);
+ SYMBOL_PRINT_NAME (sym_class), tmp);
}
}
diff --git a/gdb/maint.c b/gdb/maint.c
index 7bdb102..f2dfa68 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -494,7 +494,7 @@ maintenance_translate_address (char *arg, int from_tty)
if (sym)
printf_filtered ("%s+%s\n",
- SYMBOL_SOURCE_NAME (sym),
+ SYMBOL_PRINT_NAME (sym),
paddr_u (address - SYMBOL_VALUE_ADDRESS (sym)));
else if (sect)
printf_filtered ("no symbol at %s:0x%s\n", sect->name, paddr (address));
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index e447b91..48196fc 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1,6 +1,6 @@
/* Objective-C language support routines for GDB, the GNU debugger.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Apple Computer, Inc.
Written by Michael Snyder.
@@ -799,8 +799,8 @@ compare_selectors (const void *a, const void *b)
{
char *aname, *bname;
- aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a);
- bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b);
+ aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
+ bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
if (aname == NULL || bname == NULL)
error ("internal: compare_selectors(1)");
@@ -957,8 +957,8 @@ compare_classes (const void *a, const void *b)
{
char *aname, *bname;
- aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a);
- bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b);
+ aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
+ bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
if (aname == NULL || bname == NULL)
error ("internal: compare_classes(1)");
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index a99d4e9..1592515 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -1,5 +1,5 @@
/* Support for printing Pascal values for GDB, the GNU debugger.
- Copyright 2000, 2001
+ Copyright 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -213,7 +213,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
&& (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
{
fputs_filtered (" <", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (msymbol), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (msymbol), stream);
fputs_filtered (">", stream);
}
if (vt_address && vtblprint)
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 99a822d..9b0c641 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -641,7 +641,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */
{
name_location = BLOCK_START (SYMBOL_BLOCK_VALUE (symbol));
if (do_demangle || asm_demangle)
- name_temp = SYMBOL_SOURCE_NAME (symbol);
+ name_temp = SYMBOL_PRINT_NAME (symbol);
else
name_temp = SYMBOL_NAME (symbol);
}
@@ -656,7 +656,7 @@ build_address_symbolic (CORE_ADDR addr, /* IN */
symtab = 0;
name_location = SYMBOL_VALUE_ADDRESS (msymbol);
if (do_demangle || asm_demangle)
- name_temp = SYMBOL_SOURCE_NAME (msymbol);
+ name_temp = SYMBOL_PRINT_NAME (msymbol);
else
name_temp = SYMBOL_NAME (msymbol);
}
@@ -1044,10 +1044,10 @@ sym_info (char *arg, int from_tty)
offset = sect_addr - SYMBOL_VALUE_ADDRESS (msymbol);
if (offset)
printf_filtered ("%s + %u in ",
- SYMBOL_SOURCE_NAME (msymbol), offset);
+ SYMBOL_PRINT_NAME (msymbol), offset);
else
printf_filtered ("%s in ",
- SYMBOL_SOURCE_NAME (msymbol));
+ SYMBOL_PRINT_NAME (msymbol));
if (pc_in_unmapped_range (addr, sect))
printf_filtered ("load address range of ");
if (section_is_overlay (sect))
@@ -1882,7 +1882,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num,
annotate_arg_begin ();
list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- fprintf_symbol_filtered (stb->stream, SYMBOL_SOURCE_NAME (sym),
+ fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (sym),
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
ui_out_field_stream (uiout, "name", stb);
annotate_arg_name_end ();
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 0afd6d5..ee3b400 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1722,7 +1722,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
{
reg_value_complaint (SYMBOL_VALUE (sym),
NUM_REGS + NUM_PSEUDO_REGS,
- SYMBOL_SOURCE_NAME (sym));
+ SYMBOL_PRINT_NAME (sym));
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
}
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@@ -1738,7 +1738,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
{
reg_value_complaint (SYMBOL_VALUE (sym),
NUM_REGS + NUM_PSEUDO_REGS,
- SYMBOL_SOURCE_NAME (sym));
+ SYMBOL_PRINT_NAME (sym));
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
}
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@@ -1989,7 +1989,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
{
reg_value_complaint (SYMBOL_VALUE (sym),
NUM_REGS + NUM_PSEUDO_REGS,
- SYMBOL_SOURCE_NAME (sym));
+ SYMBOL_PRINT_NAME (sym));
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
}
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
diff --git a/gdb/stack.c b/gdb/stack.c
index d689f9c..f4e79da 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -361,7 +361,7 @@ print_frame (struct frame_info *fi,
}
else
{
- /* I'd like to use SYMBOL_SOURCE_NAME() here, to display the
+ /* I'd like to use SYMBOL_PRINT_NAME() here, to display the
demangled name that we already have stored in the symbol
table, but we stored a version with DMGL_PARAMS turned
on, and here we don't want to display parameters. So call
@@ -382,7 +382,7 @@ print_frame (struct frame_info *fi,
/* If the demangler fails, try the demangled name from
the symbol table. This'll have parameters, but
that's preferable to diplaying a mangled name. */
- funname = SYMBOL_SOURCE_NAME (func);
+ funname = SYMBOL_PRINT_NAME (func);
}
}
}
@@ -639,7 +639,7 @@ frame_info (char *addr_exp, int from_tty)
s = find_pc_symtab (get_frame_pc (fi));
if (func)
{
- /* I'd like to use SYMBOL_SOURCE_NAME() here, to display
+ /* I'd like to use SYMBOL_PRINT_NAME() here, to display
* the demangled name that we already have stored in
* the symbol table, but we stored a version with
* DMGL_PARAMS turned on, and here we don't want
@@ -663,7 +663,7 @@ frame_info (char *addr_exp, int from_tty)
* but that's preferable to diplaying a mangled name.
*/
if (demangled == NULL)
- funname = SYMBOL_SOURCE_NAME (func);
+ funname = SYMBOL_PRINT_NAME (func);
}
}
else
@@ -1086,7 +1086,7 @@ print_block_frame_locals (struct block *b, register struct frame_info *fi,
values_printed = 1;
for (j = 0; j < num_tabs; j++)
fputs_filtered ("\t", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
fputs_filtered (" = ", stream);
print_variable_value (sym, fi, stream);
fprintf_filtered (stream, "\n");
@@ -1123,7 +1123,7 @@ print_block_frame_labels (struct block *b, int *have_default,
struct symtab_and_line sal;
sal = find_pc_line (SYMBOL_VALUE_ADDRESS (sym), 0);
values_printed = 1;
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
if (addressprint)
{
fprintf_filtered (stream, " ");
@@ -1310,7 +1310,7 @@ print_frame_arg_vars (register struct frame_info *fi,
case LOC_REGPARM_ADDR:
case LOC_BASEREG_ARG:
values_printed = 1;
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
fputs_filtered (" = ", stream);
/* We have to look up the symbol because arguments can have
@@ -1622,7 +1622,7 @@ return_command (char *retval_exp, int from_tty)
{
if (thisfun != 0)
{
- if (!query ("Make %s return now? ", SYMBOL_SOURCE_NAME (thisfun)))
+ if (!query ("Make %s return now? ", SYMBOL_PRINT_NAME (thisfun)))
{
error ("Not confirmed.");
/* NOTREACHED */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 62f9679..86508d1 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -210,7 +210,7 @@ compare_symbols (const void *s1p, const void *s2p)
s1 = (struct symbol **) s1p;
s2 = (struct symbol **) s2p;
- return (strcmp (SYMBOL_SOURCE_NAME (*s1), SYMBOL_SOURCE_NAME (*s2)));
+ return (strcmp (SYMBOL_PRINT_NAME (*s1), SYMBOL_PRINT_NAME (*s2)));
}
/*
@@ -243,8 +243,8 @@ compare_psymbols (const void *s1p, const void *s2p)
s1 = (struct partial_symbol **) s1p;
s2 = (struct partial_symbol **) s2p;
- st1 = SYMBOL_SOURCE_NAME (*s1);
- st2 = SYMBOL_SOURCE_NAME (*s2);
+ st1 = SYMBOL_PRINT_NAME (*s1);
+ st2 = SYMBOL_PRINT_NAME (*s2);
if ((st1[0] - st2[0]) || !st1[0])
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index f6a8674..8c49025 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -1,8 +1,8 @@
/* Do various things to symbol tables (other than lookup), for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation,
- Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -600,7 +600,7 @@ print_symbol (void *args)
print_spaces (depth, outfile);
if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE)
{
- fprintf_filtered (outfile, "label %s at ", SYMBOL_SOURCE_NAME (symbol));
+ fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
if (SYMBOL_BFD_SECTION (symbol))
fprintf_filtered (outfile, " section %s\n",
@@ -635,14 +635,14 @@ print_symbol (void *args)
if (SYMBOL_TYPE (symbol))
{
/* Print details of types, except for enums where it's clutter. */
- LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_SOURCE_NAME (symbol),
+ LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_PRINT_NAME (symbol),
outfile,
TYPE_CODE (SYMBOL_TYPE (symbol)) != TYPE_CODE_ENUM,
depth);
fprintf_filtered (outfile, "; ");
}
else
- fprintf_filtered (outfile, "%s ", SYMBOL_SOURCE_NAME (symbol));
+ fprintf_filtered (outfile, "%s ", SYMBOL_PRINT_NAME (symbol));
switch (SYMBOL_CLASS (symbol))
{
diff --git a/gdb/symtab.c b/gdb/symtab.c
index e77cd21..c3c6d7f 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1396,7 +1396,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
{
do_linear_search = 1;
}
- if (strcmp (SYMBOL_SOURCE_NAME (*center), name) >= 0)
+ if (strcmp (SYMBOL_PRINT_NAME (*center), name) >= 0)
{
top = center;
}
@@ -1642,15 +1642,15 @@ lookup_block_symbol (register const struct block *block, const char *name,
{
do_linear_search = 1;
}
- if (SYMBOL_SOURCE_NAME (sym)[0] < name[0])
+ if (SYMBOL_PRINT_NAME (sym)[0] < name[0])
{
bot = inc;
}
- else if (SYMBOL_SOURCE_NAME (sym)[0] > name[0])
+ else if (SYMBOL_PRINT_NAME (sym)[0] > name[0])
{
top = inc;
}
- else if (strcmp (SYMBOL_SOURCE_NAME (sym), name) < 0)
+ else if (strcmp (SYMBOL_PRINT_NAME (sym), name) < 0)
{
bot = inc;
}
@@ -1682,7 +1682,7 @@ lookup_block_symbol (register const struct block *block, const char *name,
{
return sym;
}
- if (SYMBOL_SOURCE_NAME (sym)[0] > name[0])
+ if (SYMBOL_PRINT_NAME (sym)[0] > name[0])
{
break;
}
@@ -2737,8 +2737,8 @@ compare_search_syms (const void *sa, const void *sb)
struct symbol_search **sym_a = (struct symbol_search **) sa;
struct symbol_search **sym_b = (struct symbol_search **) sb;
- return strcmp (SYMBOL_SOURCE_NAME ((*sym_a)->symbol),
- SYMBOL_SOURCE_NAME ((*sym_b)->symbol));
+ return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol),
+ SYMBOL_PRINT_NAME ((*sym_b)->symbol));
}
/* Sort the ``nfound'' symbols in the list after prevtail. Leave
@@ -3126,7 +3126,7 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym,
{
type_print (SYMBOL_TYPE (sym),
(SYMBOL_CLASS (sym) == LOC_TYPEDEF
- ? "" : SYMBOL_SOURCE_NAME (sym)),
+ ? "" : SYMBOL_PRINT_NAME (sym)),
gdb_stdout, 0);
printf_filtered (";\n");
@@ -3149,7 +3149,7 @@ print_msymbol_info (struct minimal_symbol *msymbol)
tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol),
"016l");
printf_filtered ("%s %s\n",
- tmp, SYMBOL_SOURCE_NAME (msymbol));
+ tmp, SYMBOL_PRINT_NAME (msymbol));
}
/* This is the guts of the commands "info functions", "info types", and
@@ -3264,7 +3264,7 @@ rbreak_command (char *regexp, int from_tty)
{
break_command (SYMBOL_NAME (p->msymbol), from_tty);
printf_filtered ("<function, no debug info> %s;\n",
- SYMBOL_SOURCE_NAME (p->msymbol));
+ SYMBOL_PRINT_NAME (p->msymbol));
}
}
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 2b5a17b..6be4798 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -172,12 +172,15 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol);
#define SYMBOL_OBJC_DEMANGLED_NAME(symbol) \
(symbol)->ginfo.language_specific.objc_specific.demangled_name
-/* Macro that returns the "natural source name" of a symbol. In C++ this is
- the "demangled" form of the name if demangle is on and the "mangled" form
- of the name if demangle is off. In other languages this is just the
- symbol name. The result should never be NULL. */
-
-#define SYMBOL_SOURCE_NAME(symbol) \
+/* Macro that returns a version of the name of a symbol that is
+ suitable for output. In C++ this is the "demangled" form of the
+ name if demangle is on and the "mangled" form of the name if
+ demangle is off. In other languages this is just the symbol name.
+ The result should never be NULL. Don't use this for internal
+ purposes (e.g. storing in a hashtable): it's only suitable for
+ output. */
+
+#define SYMBOL_PRINT_NAME(symbol) \
(demangle && SYMBOL_DEMANGLED_NAME (symbol) != NULL \
? SYMBOL_DEMANGLED_NAME (symbol) \
: SYMBOL_NAME (symbol))
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 58ca98f..fc0620f 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1,6 +1,6 @@
/* Tracing functionality for remote targets in custom GDB protocol
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This file is part of GDB.
@@ -509,7 +509,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
if (sym)
{
fputs_filtered ("in ", gdb_stdout);
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), gdb_stdout);
+ fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
wrap_here (wrap_indent);
fputs_filtered (" at ", gdb_stdout);
}
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index b184103..9786b2a 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -68,7 +68,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
type_print (type, "", stream, 0);
if (TYPE_NAME ((SYMBOL_TYPE (new))) == 0
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
- fprintf_filtered (stream, " %s", SYMBOL_SOURCE_NAME (new));
+ fprintf_filtered (stream, " %s", SYMBOL_PRINT_NAME (new));
break;
#endif
#ifdef _LANG_m2
@@ -76,7 +76,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
fprintf_filtered (stream, "TYPE ");
if (!TYPE_NAME (SYMBOL_TYPE (new))
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)) != 0)
- fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
+ fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new));
else
fprintf_filtered (stream, "<builtin> = ");
type_print (type, "", stream, 0);
@@ -85,7 +85,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
#ifdef _LANG_pascal
case language_pascal:
fprintf_filtered (stream, "type ");
- fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
+ fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new));
type_print (type, "", stream, 0);
break;
#endif
diff --git a/gdb/valops.c b/gdb/valops.c
index f904f8c..a9b97cd 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -835,9 +835,9 @@ value_of_variable (struct symbol *var, struct block *b)
if (!frame)
{
if (BLOCK_FUNCTION (b)
- && SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)))
+ && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)))
error ("No frame is currently executing in block %s.",
- SYMBOL_SOURCE_NAME (BLOCK_FUNCTION (b)));
+ SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)));
else
error ("No frame is currently executing in specified block");
}
@@ -845,7 +845,7 @@ value_of_variable (struct symbol *var, struct block *b)
val = read_var_value (var, frame);
if (!val)
- error ("Address of symbol \"%s\" is unknown.", SYMBOL_SOURCE_NAME (var));
+ error ("Address of symbol \"%s\" is unknown.", SYMBOL_PRINT_NAME (var));
return val;
}
@@ -1658,7 +1658,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
symbol = find_pc_function (funaddr);
if (symbol)
{
- name = SYMBOL_SOURCE_NAME (symbol);
+ name = SYMBOL_PRINT_NAME (symbol);
}
else
{
@@ -1667,7 +1667,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
if (msymbol)
{
- name = SYMBOL_SOURCE_NAME (msymbol);
+ name = SYMBOL_PRINT_NAME (msymbol);
}
}
if (name == NULL)