This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2] compile: Fix GNU-IFUNC funcs called from injected code
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 25 Feb 2015 08:20:28 +0000
- Subject: Re: [patchv2] compile: Fix GNU-IFUNC funcs called from injected code
- Authentication-results: sourceware.org; auth=none
- References: <20150224190720 dot GA32497 at host1 dot jankratochvil dot net> <20150224200237 dot GA1746 at host1 dot jankratochvil dot net>
On 24/02/15 20:02, Jan Kratochvil wrote:
> Testcase cosmetic update.
>
> compile-gnu-ifunc2.patch
>
> gdb/ChangeLog
> 2015-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * compile/compile-c-symbols.c (convert_one_symbol, convert_symbol_bmsym)
> (gcc_symbol_address): Call gnu_ifunc_resolve_addr.
>
> gdb/testsuite/ChangeLog
> 2015-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.compile/compile-ifunc.c: New file.
> * gdb.compile/compile-ifunc.exp: New file.
Thanks. This looks great other than the following nit:
> case mst_text_gnu_ifunc:
> - type = objfile_type (objfile)->nodebug_text_gnu_ifunc_symbol;
> + // nodebug_text_gnu_ifunc_symbol would cause:
> + // function return type cannot be function
Not sure if we allow // comments yet.
> + if (TYPE_GNU_IFUNC (SYMBOL_TYPE (sym)))
> + result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
Is this guaranteed to return a value to result (or an exception)?
Cheers
Phil