Re: [PATCH] Add fullname field for MI -break-info command

Nick Roberts
2006-01-26T11:27:28Z

+ if (ui_out_is_mi_like_p (uiout))
+ {
+ if (b->loc->loc_type == bp_loc_software_breakpoint ||
+ b->loc->loc_type == bp_loc_hardware_watchpoint)
^^^^^^^^^^
Should this be bp_loc_hardware_breakpoint?

+ {
+ struct symtab_and_line sal = find_pc_line (b->loc->address, 0);
+ symtab_to_fullname (sal.symtab);
+
+ if (sal.symtab->fullname)
+ {
+ annotate_field(10);
+ ui_out_field_string (uiout, "fullname", sal.symtab->fullname);
+ }
+ }
+ }
+

Also, I would move it up breakpoint.c (without the call to annotate_field)
to here:

if (b->source_file)
{
sym = find_pc_sect_function (b->loc->address, b->loc->section);
if (sym)
{
ui_out_text (uiout, "in ");
ui_out_field_string (uiout, "func",
SYMBOL_PRINT_NAME (sym));
ui_out_wrap_hint (uiout, wrap_indent);
ui_out_text (uiout, " at ");
}
ui_out_field_string (uiout, "file", b->source_file);
ui_out_text (uiout, ":");

--->

ui_out_field_int (uiout, "line", b->line_number);
}

to be consistent with the output of print_frame, where the order is
file, fullname, line.

Putting it here might also mean that the test for b->loc->loc_type isn't
needed, but I don't really know.

Nick http://www.inet.net.nz/~nickrob