This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Adjustment to DW_TAG_GNU_call_site patch for ICF debug
- From: Cary Coutant <ccoutant at google dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Roland McGrath <roland at redhat dot com>, Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Dec 2010 13:28:33 -0800
- Subject: Re: [PATCH] Adjustment to DW_TAG_GNU_call_site patch for ICF debug
- References: <20101223211226.GM16156@tyan-ft48-01.lab.bos.redhat.com>
> The patch below arranges in that case (as can be seen on the testcase below)
> to have DW_AT_GNU_call_site_target_clobbered (e.g. on x86_64 if this is
> passed in %rdi and OBJ_TYPE_REF token is 0 it is
> DW_OP_breg5 0 DW_OP_deref DW_OP_deref), i.e. where at the call time can be
> the address found. ?The debugger could check that %rdi in this case in the
> called function is the artificial this parameter, assume in C++ it doesn't
> change in the function and use that to discover the called function's
> vtable.
>
> And/or we could invent a new attribute which would contain what the
> .debug_vcall function contained, i.e. the OBJ_TYPE_REF_TOKEN value.
If we can access the pointer to the called function's vtable directly,
I don't think we need the vtable slot index that was stored in the
.debug_vcall table. I'll have to think about it some more, though, to
be sure. How reasonable is it to assume that the artificial this
parameter doesn't move around?
> I haven't seen .debug_dcall/.debug_vcall support patches for gdb anywhere,
> and the patch doesn't disable generation of those sections (though, that
> could be simplified now that the OBJ_TYPE_REF should be available from the
> CALL_INSN).
I started the work in gdb, but dropped it a while back and haven't
gotten back to it. There's no legacy yet that depends on those two
tables.
-cary