* tracepoint.c (tracepoint_operation): Report the deletion event
authorJim Blandy <jimb@codesourcery.com>
Sat, 27 Oct 2007 00:34:48 +0000 (00:34 +0000)
committerJim Blandy <jimb@codesourcery.com>
Sat, 27 Oct 2007 00:34:48 +0000 (00:34 +0000)
after we have unlinked the tracepoint from the list, and use the
proper tracepoint number.

gdb/ChangeLog
gdb/tracepoint.c

index f30265a46b4309f800218be1d389d7737d60f53f..65ea0a675c76b108349a9b5780b61ccfb6a27b7a 100644 (file)
@@ -1,5 +1,9 @@
 2007-10-26  Jim Blandy  <jimb@codesourcery.com>
 
+       * tracepoint.c (tracepoint_operation): Report the deletion event
+       after we have unlinked the tracepoint from the list, and use the
+       proper tracepoint number.
+
        * ax-gdb.c (expr_to_agent): Delete unused function.
        (expr_to_address_and_size): Delete #if 0'd function.
        * ax-gdb.h (expr_to_agent): Delete declaration.
index 1931e6c4cff70f307150cd9275512d59bc12681f..e9568e50a57e9db7a1fb8897c8e374fb19ad4f15 100644 (file)
@@ -583,11 +583,12 @@ tracepoint_operation (struct tracepoint *t, int from_tty,
       ALL_TRACEPOINTS (t2)
        if (t2->next == t)
        {
-         tracepoint_delete_event (t2->number);
          t2->next = t->next;
          break;
        }
 
+      tracepoint_delete_event (t->number);
+
       if (t->addr_string)
        xfree (t->addr_string);
       if (t->source_file)