This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Make mi_cmd_break_insert exception-safe.


On Jan 31, 2008 2:16 PM, Daniel Jacobowitz <drow@false.org> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]