* linespec.h (struct linespec_result) <special_display>: New
authorTom Tromey <tromey@redhat.com>
Thu, 24 Mar 2011 19:47:17 +0000 (19:47 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 24 Mar 2011 19:47:17 +0000 (19:47 +0000)
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.

gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/linespec.h

index 758149d420f5be8231d1dfeef9434c01802b61bc..6dcf808e9c9a6c15a2796357ec23585645c9db58 100644 (file)
@@ -1,3 +1,15 @@
+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.
index 8822855dc22b2e700bb62615199e264b72523e81..dbd9588a06def00d1fa60b90ad5cbcd25e394b4e 100644 (file)
@@ -4622,7 +4622,9 @@ print_breakpoint_location (struct breakpoint *b,
   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);
@@ -7205,7 +7207,7 @@ create_breakpoint_sal (struct gdbarch *gdbarch,
                       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;
@@ -7314,6 +7316,7 @@ create_breakpoint_sal (struct gdbarch *gdbarch,
        }
     }   
 
+  b->display_canonical = display_canonical;
   if (addr_string)
     b->addr_string = addr_string;
   else
@@ -7498,7 +7501,8 @@ create_breakpoints_sal (struct gdbarch *gdbarch,
       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);
     }
 }
 
@@ -7954,7 +7958,8 @@ create_breakpoint (struct gdbarch *gdbarch,
                                     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);
 
index bd097137e6ffa1ddbb4cd34bd6f0e69b348733b3..d5af928f7d324defe38aa4b0a9b00230b4c665d0 100644 (file)
@@ -472,6 +472,8 @@ struct breakpoint
     /* Non-zero means a silent breakpoint (don't print frame info
        if we stop here).  */
     unsigned char silent;
+    /* Non-zero means display ADDR_STRING to the user verbatim.  */
+    unsigned char display_canonical;
     /* Number of stops at this breakpoint that should
        be continued automatically before really stopping.  */
     int ignore_count;
index 3366fc6950636b37dbe404016dbddf34812455b0..d8d2ec9013ea0897c964acc0cfac8e885593818a 100644 (file)
@@ -25,6 +25,11 @@ struct symtab;
 
 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.