+2011-03-24 Tom Tromey <tromey@redhat.com>
+
+ * linespec.h (struct linespec_result) <special_display>: New
+ field.
+ * breakpoint.h (struct breakpoint) <display_canonical>: New
+ field.
+ * breakpoint.c (print_breakpoint_location): Respect
+ display_canonical.
+ (create_breakpoint_sal): Add 'display_canonical' parameter.
+ (create_breakpoints_sal): Update.
+ (create_breakpoint): Update.
+
2011-03-24 Tom Tromey <tromey@redhat.com>
* symtab.c (decode_line_spec): Update.
if (loc != NULL)
set_current_program_space (loc->pspace);
- if (b->source_file && loc)
+ if (b->display_canonical)
+ ui_out_field_string (uiout, "what", b->addr_string);
+ else if (b->source_file && loc)
{
struct symbol *sym
= find_pc_sect_function (loc->address, loc->section);
enum bptype type, enum bpdisp disposition,
int thread, int task, int ignore_count,
struct breakpoint_ops *ops, int from_tty,
- int enabled, int internal)
+ int enabled, int internal, int display_canonical)
{
struct breakpoint *b = NULL;
int i;
}
}
+ b->display_canonical = display_canonical;
if (addr_string)
b->addr_string = addr_string;
else
create_breakpoint_sal (gdbarch, expanded, canonical->canonical[i],
cond_string, type, disposition,
thread, task, ignore_count, ops,
- from_tty, enabled, internal);
+ from_tty, enabled, internal,
+ canonical->special_display);
}
}
cond_string, type_wanted,
tempflag ? disp_del : disp_donttouch,
thread, task, ignore_count, ops,
- from_tty, enabled, internal);
+ from_tty, enabled, internal,
+ canonical.special_display);
do_cleanups (old_chain);
struct linespec_result
{
+ /* If non-zero, the linespec should be displayed to the user. This
+ is used by "unusual" linespecs where the ordinary `info break'
+ display mechanism would do the wrong thing. */
+ int special_display;
+
/* If non-NULL, an array of canonical names for returned
symtab_and_line objects. The array has as many elements as the
`nelts' field in the symtabs_and_line returned by decode_line_1.