This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Instrument-functions: possible also for function exit via exception?
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Tim MÃnchen" <muenchen at physik dot uni-wuppertal dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 29 Aug 2008 14:04:15 -0700
- Subject: Re: Instrument-functions: possible also for function exit via exception?
- References: <200808291136.12172.muenchen@physik.uni-wuppertal.de>
On Fri, Aug 29, 2008 at 2:36 AM, Tim MÃnchen
<muenchen@physik.uni-wuppertal.de> wrote:
> is it somehow possible to also be notified if a function/method is left with
> a 'throw'? Or, would it be possible to patch gcc like that? I had a quick
> look into function.c but it seems not to be as straight-forward as the
> entry/exit instrumentation (What is probably the reason it isn't implemented
> yet). Or is it even impossible for some reason?
In 4.0 and above -finstruction-functions actually emits the exit
function call for exceptions too, it is wrapped in a "finally" clause.
Thanks,
Andrew Pinski