This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch v4 03/13] cli, btrace: add btrace cli
>>>>> "Markus" == markus t metzger <markus.t.metzger@intel.com> writes:
Markus> +/* Print the function containing the btrace list item @trace. */
Markus> +static void
Markus> +do_btrace_list_function (struct btrace_block *trace)
Markus> +{
Markus> + struct symbol *symbol = find_pc_function (trace->begin);
Markus> +
Markus> + ui_out_text (current_uiout, " in ");
Markus> + if (symbol)
Markus> + ui_out_field_string (current_uiout, "function",
Markus> + SYMBOL_PRINT_NAME (symbol));
Markus> + else
Markus> + {
Markus> + struct minimal_symbol *msymbol =
Markus> + lookup_minimal_symbol_by_pc (trace->begin);
Markus> +
Markus> + if (msymbol)
Markus> + ui_out_field_string (current_uiout, "function",
Markus> + SYMBOL_PRINT_NAME (msymbol));
Markus> + else
Markus> + ui_out_text (current_uiout, "??");
Markus> + }
Markus> +
Markus> + ui_out_text (current_uiout, " ()");
I think these parens will look strange if you try it with C++ code.
There, the argument types are part of the symbol name.
Tom