From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5690 invoked by alias); 27 Oct 2007 00:31:20 -0000 Received: (qmail 5667 invoked by uid 22791); 27 Oct 2007 00:31:16 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 27 Oct 2007 00:31:15 +0000 Received: (qmail 32117 invoked from network); 27 Oct 2007 00:31:12 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Oct 2007 00:31:12 -0000 To: gdb-patches@sourceware.org Subject: PATCH: tracepoints: Report tracepoint deletions properly From: Jim Blandy Date: Sat, 27 Oct 2007 01:32:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00731.txt.bz2 Committed as obvious. I don't think this matters a bit, as there seem to be no clients of this particular event, unless I've missed something. gdb/ChangeLog: 2007-10-26 Jim Blandy * tracepoint.c (tracepoint_operation): Report the deletion event after we have unlinked the tracepoint from the list, and use the proper tracepoint number. diff -r db46634d8623 gdb/tracepoint.c --- a/gdb/tracepoint.c Fri Oct 26 16:39:42 2007 -0700 +++ b/gdb/tracepoint.c Fri Oct 26 17:25:51 2007 -0700 @@ -583,10 +583,11 @@ tracepoint_operation (struct tracepoint 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);