DO_DEMANGLE controls whether to print a symbol in its native "raw" form,
or to interpret it as a possible C++ name and convert it back to source
form. However note that DO_DEMANGLE can be overridden by the specific
- settings of the demangle and asm_demangle variables. */
+ settings of the demangle and asm_demangle variables. Returns
+ non-zero if anything was printed; zero otherwise. */
-void
+int
print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
struct ui_file *stream,
int do_demangle, char *leadin)
&filename, &line, &unmapped))
{
do_cleanups (cleanup_chain);
- return;
+ return 0;
}
fputs_filtered (leadin, stream);
fputs_filtered (">", stream);
do_cleanups (cleanup_chain);
+ return 1;
}
/* Given an address ADDR return all the elements needed to print the
name_temp = SYMBOL_LINKAGE_NAME (symbol);
}
+ if (msymbol != NULL
+ && MSYMBOL_SIZE (msymbol) == 0
+ && MSYMBOL_TYPE (msymbol) != mst_text
+ && MSYMBOL_TYPE (msymbol) != mst_text_gnu_ifunc
+ && MSYMBOL_TYPE (msymbol) != mst_file_text)
+ msymbol = NULL;
+
if (msymbol != NULL)
{
if (SYMBOL_VALUE_ADDRESS (msymbol) > name_location || symbol == NULL)
/* Print address ADDR symbolically on STREAM. Parameter DEMANGLE
controls whether to print the symbolic name "raw" or demangled.
- Global setting "addressprint" controls whether to print hex address
- or not. */
+ Return non-zero if anything was printed; zero otherwise. */
-void
+int
print_address_demangle (const struct value_print_options *opts,
struct gdbarch *gdbarch, CORE_ADDR addr,
struct ui_file *stream, int do_demangle)
}
else
{
- print_address_symbolic (gdbarch, addr, stream, do_demangle, "");
+ return print_address_symbolic (gdbarch, addr, stream, do_demangle, "");
}
+ return 1;
}
\f