This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]