From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20406 invoked by alias); 1 Feb 2008 15:49:28 -0000 Received: (qmail 20398 invoked by uid 22791); 1 Feb 2008 15:49:28 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Feb 2008 15:49:11 +0000 Received: from zps19.corp.google.com (zps19.corp.google.com [172.25.146.19]) by smtp-out.google.com with ESMTP id m11Fn6qe020793 for ; Fri, 1 Feb 2008 07:49:06 -0800 Received: from wa-out-1112.google.com (wagn4.prod.google.com [10.114.215.4]) by zps19.corp.google.com with ESMTP id m11FmjXn003495 for ; Fri, 1 Feb 2008 07:49:05 -0800 Received: by wa-out-1112.google.com with SMTP id n4so1909271wag.6 for ; Fri, 01 Feb 2008 07:49:05 -0800 (PST) Received: by 10.115.94.1 with SMTP id w1mr4143289wal.85.1201880585130; Fri, 01 Feb 2008 07:43:05 -0800 (PST) Received: by 10.114.13.5 with HTTP; Fri, 1 Feb 2008 07:43:05 -0800 (PST) Message-ID: Date: Fri, 01 Feb 2008 15:49:00 -0000 From: "Doug Evans" To: "Vladimir Prus" , gdb-patches@sources.redhat.com Subject: Re: [RFA] Make mi_cmd_break_insert exception-safe. In-Reply-To: <20080131221653.GB6715@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200801271715.08542.vladimir@codesourcery.com> <20080131221653.GB6715@caradoc.them.org> 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: 2008-02/txt/msg00016.txt.bz2 On Jan 31, 2008 2:16 PM, Daniel Jacobowitz wrote: > On Sun, Jan 27, 2008 at 05:15:07PM +0300, Vladimir Prus wrote: > > The gdb_breakpoint function, as I understand it, was supposed to be part of > > libgdb interface, defined in gdb.h header. However, libgdb is not even close to > > being usable, and when I've asked about using gdb as a library some time ago, the > > response was that it's too hard to do, and it's no longer a goal. Therefore, > > I think it makes no sense to keep gdb_breakpoint non-throwing. > > There is a convention that the gdb_* functions don't throw, though. > It's very confusing what does and does not throw in GDB. Before this > patch, did gdb_breakpoint actually throw? If so, would fixing it > by using try/catch inside gdb_breakpoint fix this bug too? For future generations I wonder if we need to add something to gdbint.texinfo. Maybe something along the lines of "gdb_* functions in general do not throw, but that is an artifact of the original libgdb design which is no longer important. That does not mean go out and make anything throw willy-nilly, but if the preferred solution involves making a gdb_* function throw where it did not before, then go ahead." Or some such.