add the cleanup checker
[deliverable/binutils-gdb.git] / gdb / tracepoint.c
index ba59ab0dd3154102630f00de483c24ae07e7f776..26aedac4825009cf7cc3412d478d87755c0093e1 100644 (file)
@@ -1241,7 +1241,7 @@ clear_collection_list (struct collection_list *list)
 
 /* Reduce a collection list to string form (for gdb protocol).  */
 static char **
-stringify_collection_list (struct collection_list *list, char *string)
+stringify_collection_list (struct collection_list *list)
 {
   char temp_buf[2048];
   char tmp2[40];
@@ -1364,7 +1364,6 @@ stringify_collection_list (struct collection_list *list, char *string)
 
 static void
 encode_actions_1 (struct command_line *action,
-                 struct breakpoint *t,
                  struct bp_location *tloc,
                  int frame_reg,
                  LONGEST frame_offset,
@@ -1597,7 +1596,7 @@ encode_actions_1 (struct command_line *action,
             here.  */
          gdb_assert (stepping_list);
 
-         encode_actions_1 (action->body_list[0], t, tloc, frame_reg,
+         encode_actions_1 (action->body_list[0], tloc, frame_reg,
                            frame_offset, stepping_list, NULL);
        }
       else
@@ -1608,10 +1607,9 @@ encode_actions_1 (struct command_line *action,
 /* Render all actions into gdb protocol.  */
 
 void
-encode_actions (struct breakpoint *t, struct bp_location *tloc,
-               char ***tdp_actions, char ***stepping_actions)
+encode_actions (struct bp_location *tloc, char ***tdp_actions,
+               char ***stepping_actions)
 {
-  static char tdp_buff[2048], step_buff[2048];
   char *default_collect_line = NULL;
   struct command_line *actions;
   struct command_line *default_collect_action = NULL;
@@ -1630,7 +1628,7 @@ encode_actions (struct breakpoint *t, struct bp_location *tloc,
   gdbarch_virtual_frame_pointer (tloc->gdbarch,
                                 tloc->address, &frame_reg, &frame_offset);
 
-  actions = breakpoint_commands (t);
+  actions = breakpoint_commands (tloc->owner);
 
   /* If there are default expressions to collect, make up a collect
      action and prepend to the action list to encode.  Note that since
@@ -1642,7 +1640,7 @@ encode_actions (struct breakpoint *t, struct bp_location *tloc,
       default_collect_line =  xstrprintf ("collect %s", default_collect);
       make_cleanup (xfree, default_collect_line);
 
-      validate_actionline (default_collect_line, t);
+      validate_actionline (default_collect_line, tloc->owner);
 
       default_collect_action = xmalloc (sizeof (struct command_line));
       make_cleanup (xfree, default_collect_action);
@@ -1650,16 +1648,14 @@ encode_actions (struct breakpoint *t, struct bp_location *tloc,
       default_collect_action->line = default_collect_line;
       actions = default_collect_action;
     }
-  encode_actions_1 (actions, t, tloc, frame_reg, frame_offset,
+  encode_actions_1 (actions, tloc, frame_reg, frame_offset,
                    &tracepoint_list, &stepping_list);
 
   memrange_sortmerge (&tracepoint_list);
   memrange_sortmerge (&stepping_list);
 
-  *tdp_actions = stringify_collection_list (&tracepoint_list,
-                                           tdp_buff);
-  *stepping_actions = stringify_collection_list (&stepping_list,
-                                                step_buff);
+  *tdp_actions = stringify_collection_list (&tracepoint_list);
+  *stepping_actions = stringify_collection_list (&stepping_list);
 
   do_cleanups (back_to);
 }
This page took 0.025301 seconds and 4 git commands to generate.