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]

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


Hello!

The attached patch adds the "fullname" field to the output of MI -break-info
command.

Changelog entry:

2006-01-24 Vladimir Prus <ghost@cs.msu.su>
        
        * breakpoint.c (print_one_breakpoint): For MI-like UI, output
         'fullname' field.

Patch attached.

- Volodya
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.220
diff -u -r1.220 breakpoint.c
--- breakpoint.c	16 Jan 2006 12:55:18 -0000	1.220
+++ breakpoint.c	24 Jan 2006 15:10:47 -0000
@@ -3603,6 +3603,23 @@
       print_command_lines (uiout, l, 4);
       do_cleanups (script_chain);
     }
+
+  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)
+        {
+          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);
+            }
+        }
+    }
+
   do_cleanups (bkpt_chain);
   do_cleanups (old_chain);
 }

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