From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: yao@codesourcery.com (Yao Qi)
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix trace file fails on powerpc64
Date: Mon, 27 Oct 2014 11:08:00 -0000 [thread overview]
Message-ID: <201410271107.s9RB7xto005844@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <1414399382-25800-1-git-send-email-yao@codesourcery.com> from "Yao Qi" at Oct 27, 2014 04:43:02 PM
Yao Qi wrote:
> These fails are caused by writing function descriptor address into trace
> file instead of function address. This patch is to teach tfile.c to
> write function address on powerpc64 target. With this patch applied,
> fails in tfile.exp and mi-traceframe-changed.exp are fixed. Is it
> OK?
>
> gdb/testsuite:
>
> 2014-10-27 Yao Qi <yao@codesourcery.com>
>
> * gdb.trace/tfile.c (adjust_function_address) [__powerpc64__]:
> Get function address from function descriptor.
> ---
> gdb/testsuite/gdb.trace/tfile.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c
> index e69240a..e9c347c 100644
> --- a/gdb/testsuite/gdb.trace/tfile.c
> +++ b/gdb/testsuite/gdb.trace/tfile.c
> @@ -130,6 +130,9 @@ adjust_function_address (uintptr_t func_addr)
> /* Although Thumb functions are two-byte aligned, function
> pointers have the Thumb bit set. Clear it. */
> return func_addr & ~1;
> +#elif defined __powerpc64__
> + /* Get function address from function descriptor. */
> + return *(uintptr_t *) func_addr;
This will break powerpc64le, which uses the ELFv2 ABI without function
descriptors. The correct test should be something like
#elif defined __powerpc64__ && _CALL_ELF != 2
OK with that change.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2014-10-27 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 8:48 Yao Qi
2014-10-27 11:08 ` Ulrich Weigand [this message]
2014-10-27 12:15 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201410271107.s9RB7xto005844@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox