Add a constructor and destructor to linespec_result
[deliverable/binutils-gdb.git] / gdb / ax-gdb.c
index 720602239e0ec28bef58962051120ad1e4a21501..fae2e2d4836fa1ccc1b0a8069c20ca82baf23acf 100644 (file)
@@ -2603,15 +2603,13 @@ agent_command_1 (char *exp, int eval)
       struct linespec_result canonical;
       int ix;
       struct linespec_sals *iter;
-      struct cleanup *old_chain;
 
       exp = skip_spaces (exp);
-      init_linespec_result (&canonical);
+
       event_location_up location = new_linespec_location (&exp);
       decode_line_full (location.get (), DECODE_LINE_FUNFIRSTLINE, NULL,
                        (struct symtab *) NULL, 0, &canonical,
                        NULL, NULL);
-      old_chain = make_cleanup_destroy_linespec_result (&canonical);
       exp = skip_spaces (exp);
       if (exp[0] == ',')
         {
@@ -2625,7 +2623,6 @@ agent_command_1 (char *exp, int eval)
          for (i = 0; i < iter->sals.nelts; i++)
            agent_eval_command_one (exp, eval, iter->sals.sals[i].pc);
         }
-      do_cleanups (old_chain);
     }
   else
     agent_eval_command_one (exp, eval, get_frame_pc (get_current_frame ()));
This page took 0.035971 seconds and 4 git commands to generate.