This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [testsuite patchv2] [ppc64] gdb_target_symbol fix for function descriptors [Re: [testsuite patch] [ppc64] +kfail: gdb_target_symbol does not support function descriptors]
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Kevin Buettner <kevinb at redhat dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 12 Jul 2016 13:56:36 +0100
- Subject: Re: [testsuite patchv2] [ppc64] gdb_target_symbol fix for function descriptors [Re: [testsuite patch] [ppc64] +kfail: gdb_target_symbol does not support function descriptors]
- Authentication-results: sourceware.org; auth=none
- References: <20160705145454.GA26978@host1.jankratochvil.net> <CAH=s-PMKOAYhx+62K_YmBPqcqOm0ex6ijftrWhsf1nJNM7wY6w@mail.gmail.com> <20160706081122.GA19754@host1.jankratochvil.net> <20160706193508.GA2313@host1.jankratochvil.net>
Hi Jan,
On Wed, Jul 6, 2016 at 8:35 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Wed, 06 Jul 2016 10:11:22 +0200, Jan Kratochvil wrote:
>> Now the question is how to detect that. I used "powerpc64-*linux*" target
>> match in my patch but I guess that is not right. Maybe it could compile first
>> something and check if ".somesymbol" exists.
>
> Implemented the compile test.
>
> It works for me on RHEL-7.2 ppc64 and on Fedora 24 x86_64.
>
> OK for check-in?
>
> I see gdb_target_symbol_prefix is by Kevin so Ccing him if he sees it OK even
> on those platforms.
I am not sure what is the best approach of detecting function descriptor, so
I copy Ulrich.
I suspect we should check whether the program is compiled with ELFv1,
in which function descriptor is used. So probably, we need to check
__powerpc64__ and (!defined(_CALL_ELF) || _CALL_ELF != 2) instead.
--
Yao (齐尧)