From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: hjl.tools@gmail.com, jan.kratochvil@redhat.com
Subject: [PATCH v2] gdb: x86: fix x32 builds with inline asm
Date: Tue, 08 Jan 2013 18:42:00 -0000 [thread overview]
Message-ID: <1357670699-17485-1-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1357657280-24150-1-git-send-email-vapier@gentoo.org>
We need to cast the pointer up to 64bits so that the push works on x32
targets. For 64bit targets, this makes no difference.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-08 Mike Frysinger <vapier@gentoo.org>
* common/linux-ptrace.c (linux_ptrace_test_ret_to_nx) [__x86_64__]:
Cast return_address to 64bits.
---
v2
- just cast the value in the x86_64 path to fix x32 builds
gdb/common/linux-ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/common/linux-ptrace.c b/gdb/common/linux-ptrace.c
index 761ef59..886be80 100644
--- a/gdb/common/linux-ptrace.c
+++ b/gdb/common/linux-ptrace.c
@@ -114,7 +114,8 @@ linux_ptrace_test_ret_to_nx (void)
".globl linux_ptrace_test_ret_to_nx_instr;"
"linux_ptrace_test_ret_to_nx_instr:"
"ret"
- : : "r" (return_address) : "%rsp", "memory");
+ : : "r" ((uint64_t) (uintptr_t) return_address)
+ : "%rsp", "memory");
#else
# error "!__i386__ && !__x86_64__"
#endif
--
1.8.0.2
next prev parent reply other threads:[~2013-01-08 18:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 14:59 [PATCH] " Mike Frysinger
2013-01-08 15:36 ` H.J. Lu
2013-01-08 15:50 ` Mike Frysinger
2013-01-08 17:22 ` Jan Kratochvil
2013-01-08 15:57 ` Mike Frysinger
2013-01-08 16:54 ` H.J. Lu
2013-01-08 17:42 ` Mike Frysinger
2013-01-08 17:50 ` H.J. Lu
2013-01-08 18:42 ` Mike Frysinger [this message]
2013-01-08 18:52 ` [PATCH v2] " Jan Kratochvil
2013-01-08 19:18 ` Mike Frysinger
2013-01-08 19:53 ` Jan Kratochvil
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=1357670699-17485-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=jan.kratochvil@redhat.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