This is the mail archive of the
mailing list for the GCC project.
Re: begin_function debug hook.
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: begin_function debug hook.
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 15 Jul 2001 13:43:04 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20010715151544.A16605@daikokuya.demon.co.uk>
On Sun, Jul 15, 2001 at 03:15:44PM +0100, Neil Booth wrote:
> The remaining hooks are more tricky than those so far.
> This does begin_function. There remain 2 functions,
> sdbout_mark_begin_function() and dbxout_begin_function() that don't
> fit despite their names. I don't know enough about varasm.c and the
> code in final.c to know whether there is scope for rationalisation of
> these or not. Certainly there doesn't seem to be an easy way to
> integrate the two, so another hook will be needed for those.
I think the hook you're currently calling begin_function isn't.
There should be three hooks:
begin_function Called before the function is declared,
e.g. dbxout_begin_function and
begin_prologue Called after the function directives have
been emitted, but before any code has been
generated. This is the one you converted
today, for those that have
end_prologue Called after prologue instructions are
emitted. This is those for which you have
> + debug_nothing_int, 0, /* begin_function */
To avoid confusion I think you should treat this the same way as
you did dwarf2out_end_epilogue -- call the debug hook first and
then if we're doing dwarf2 eh, but not dwarf2 debug, then call