From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5539 invoked by alias); 18 Oct 2006 15:55:57 -0000 Received: (qmail 5530 invoked by uid 22791); 18 Oct 2006 15:55:57 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Oct 2006 15:55:44 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-203.snap.net.nz [202.124.120.203]) by viper.snap.net.nz (Postfix) with ESMTP id BC6AB7BA765; Thu, 19 Oct 2006 04:55:37 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 0FF1ABE453; Thu, 19 Oct 2006 04:52:33 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17718.19901.569519.210795@kahikatea.snap.net.nz> Date: Wed, 18 Oct 2006 15:55:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] PR mi/2086 -break-insert missing error diagnostic In-Reply-To: <20061018153109.GB10436@nevyn.them.org> References: <17717.17922.450312.898237@kahikatea.snap.net.nz> <20061017213119.GA14010@nevyn.them.org> <17717.20397.279496.222573@kahikatea.snap.net.nz> <20061017215754.GA15210@nevyn.them.org> <17717.27348.977065.613551@kahikatea.snap.net.nz> <20061018153109.GB10436@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.50.26 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00220.txt.bz2 Daniel Jacobowitz writes: > On Wed, Oct 18, 2006 at 12:44:20PM +1300, Nick Roberts wrote: > > The name deprecated_set_gdb_event_hooks suggests that they're earmarked for > > removal. These hooks only seem to get get in one place so presumably they > > could be set up once at initialisation and left with that value. > > They're also used by insight. This is one of the sucky things about > having insight directly linked to GDB. OK, how about just using the hack in mi_cmd_thread_select for mi_cmd_break_insert for the moment. -- Nick http://www.inet.net.nz/~nickrob *** mi-cmd-break.c 24 Dec 2005 07:57:46 +1300 1.13 --- mi-cmd-break.c 19 Oct 2006 04:46:35 +1300 *************** *** 25,30 **** --- 25,31 ---- #include "mi-out.h" #include "breakpoint.h" #include "gdb_string.h" + #include "exceptions.h" #include "mi-getopt.h" #include "gdb-events.h" #include "gdb.h" *************** mi_cmd_break_insert (char *command, char *** 164,170 **** } deprecated_set_gdb_event_hooks (old_hooks); ! if (rc == GDB_RC_FAIL) return MI_CMD_ERROR; else return MI_CMD_DONE; --- 165,175 ---- } deprecated_set_gdb_event_hooks (old_hooks); ! /* RC is enum gdb_rc if it is successful (>=0) ! enum return_reason if not (<0). */ ! if ((int) rc < 0 && (enum return_reason) rc == RETURN_ERROR) ! return MI_CMD_ERROR; ! else if ((int) rc >= 0 && rc == GDB_RC_FAIL) return MI_CMD_ERROR; else return MI_CMD_DONE;