From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24534 invoked by alias); 4 Apr 2011 15:44:22 -0000 Received: (qmail 24525 invoked by uid 22791); 4 Apr 2011 15:44:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 15:43:47 +0000 Received: (qmail 5982 invoked from network); 4 Apr 2011 15:43:45 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Apr 2011 15:43:45 -0000 From: Pedro Alves To: Tom Tromey Subject: Re: FYI: small simplification in breakpoint.c Date: Mon, 04 Apr 2011 15:44:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.1; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201104041639.16444.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104041643.42243.pedro@codesourcery.com> 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: 2011-04/txt/msg00060.txt.bz2 On Monday 04 April 2011 16:41:31, Tom Tromey wrote: > >>>>> "Pedro" == Pedro Alves writes: > > Pedro> On Monday 04 April 2011 16:33:37, Pedro Alves wrote: > >> catch_exceptions also prints the exception string, if > >> any (w/ print_any_exception), was the change intentional? (your note seems to > >> imply this is meant as a 1-1 replacement, but I do see a few > >> exception_print's below the TRY_CATCH, so I can't tell.) > > Pedro> Oh, sorry. Please ignore me. That's catch_exceptionS, but you > Pedro> replaced a use of catch_exception, which doesn't do that. > > FWIW, I'm not a fan of having two functions with such similar names. > This has bitten me a couple of times. On my current checkout I see: $ grep "= catch_exception (" * -rn breakpoint.c:7958: e = catch_exception (uiout, do_captured_parse_breakpoint, cli/cli-script.c:1632: e = catch_exception (uiout, wrapped_read_command_file, &args, cli/cli-interp.c:137: e = catch_exception (uiout, do_captured_execute_command, &args, mi/mi-main.c:1962: result = catch_exception (uiout, captured_mi_execute_command, command, remote.c:4070: ex = catch_exception (uiout, remote_start_remote, &args, RETURN_MASK_ALL); How about we just delete catch_exception? It doesn't seem to add any value. -- Pedro Alves