This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add fullname field for MI -break-info command
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 24 Jan 2006 16:13:34 -0500
- Subject: Re: [PATCH] Add fullname field for MI -break-info command
- References: <200601241932.16022.ghost@cs.msu.su>
On Tue, Jan 24, 2006 at 07:32:15PM +0300, Vladimir Prus wrote:
>
> Hello!
>
> The attached patch adds the "fullname" field to the output of MI -break-info
> command.
In addition to what Bob said, formatting points:
> + 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)
if (b->loc->loc_type == bp_loc_software_breakpoint
|| b->loc->loc_type == bp_loc_hardware_watchpoint)
> + {
> + struct symtab_and_line sal = find_pc_line (b->loc->address, 0);
> + symtab_to_fullname (sal.symtab);
> +
> + if (sal.symtab->fullname)
> + {
> + annotate_field(10);
annotate_field (10);
But I don't think you need this at all; there's no point emitting
annotations when we're guarded by ui_out_is_mi_like_p.
Also, you can use the return value from symtab_to_fullname.
--
Daniel Jacobowitz
CodeSourcery