This is the mail archive of the gdb@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: GDB to C++ issue: deletion


> Date: Fri, 1 Aug 2008 09:59:20 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> It's not clear locally (i.e. looking at any bit of code that uses
> cleanups) when or how the cleanups are executed.  They're usually
> triggered by an exception from some called function, and the code that
> invokes the cleanups is far away.  In C, people do not expect
> exceptions and so they're confused by the introduction of exception
> handling.

Thanks.  I understand what you are saying, but no longer can imagine
why people would find this confusing.  Perhaps I'm too used to Lisp,
C++, and the C code in the Emacs Lisp engine to find exception
handling confusing.

> Sometimes we run cleanups and sometimes we discard them.  This is
> confusing.  It's not something that would be necessarily affected by a
> change in language but use of an OO language might make it easier to
> represent.

Exceptions have nothing to do with OOP.  It's just a feature that is
not part of C, so it needs to be emulated.


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