This is the mail archive of the gdb-patches@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: [patchv2] compile: Fix GNU-IFUNC funcs called from injected code


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


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