gdb/
authorYao Qi <yao@codesourcery.com>
Wed, 26 Sep 2012 23:53:53 +0000 (23:53 +0000)
committerYao Qi <yao@codesourcery.com>
Wed, 26 Sep 2012 23:53:53 +0000 (23:53 +0000)
PR breakpoints/13898
* breakpoint.h (tracepoint_breakpoint_ops): Forward declaration.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Set breakpoint_ops
per breakpoint type.

gdb/ChangeLog
gdb/breakpoint.h
gdb/mi/mi-cmd-break.c

index 081e30523c6ec69977ed35f70bc4187dad92824b..959e90db6c665b45c6c0b8d2a10adb496d81ee02 100644 (file)
@@ -1,3 +1,10 @@
+2012-09-27  Yao Qi  <yao@codesourcery.com>
+
+       PR breakpoints/13898
+       * breakpoint.h (tracepoint_breakpoint_ops): Forward declaration.
+       * mi/mi-cmd-break.c (mi_cmd_break_insert): Set breakpoint_ops
+       per breakpoint type.
+
 2012-09-26  Pierre Muller  <muller@ics.u-strasbg.fr>
 
        * procfs.c: Add gdb_bfd header.
index 4c6171f4e469e8c06b0597716fa0bac7999378bc..8b1bcb737720b385d3f77dce65f1e410cdb7dd77 100644 (file)
@@ -1184,6 +1184,7 @@ extern void rwatch_command_wrapper (char *, int, int);
 extern void tbreak_command (char *, int);
 
 extern struct breakpoint_ops bkpt_breakpoint_ops;
+extern struct breakpoint_ops tracepoint_breakpoint_ops;
 
 extern void initialize_breakpoint_ops (void);
 
index 5a64bf1d5559854c7383944770aa6ed59ec1349b..2fe84dcfeccee0f7bfe302c69862065e2a6777ca 100644 (file)
@@ -76,6 +76,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
   int tracepoint = 0;
   struct cleanup *back_to;
   enum bptype type_wanted;
+  struct breakpoint_ops *ops;
 
   enum opt
     {
@@ -162,6 +163,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
   type_wanted = (tracepoint
                 ? (hardware ? bp_fast_tracepoint : bp_tracepoint)
                 : (hardware ? bp_hardware_breakpoint : bp_breakpoint));
+  ops = tracepoint ? &tracepoint_breakpoint_ops : &bkpt_breakpoint_ops;
 
   create_breakpoint (get_current_arch (), address, condition, thread,
                     NULL,
@@ -169,7 +171,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
                     temp_p, type_wanted,
                     ignore_count,
                     pending ? AUTO_BOOLEAN_TRUE : AUTO_BOOLEAN_FALSE,
-                    &bkpt_breakpoint_ops, 0, enabled, 0, 0);
+                    ops, 0, enabled, 0, 0);
   do_cleanups (back_to);
 
 }