From: Mike Frysinger Date: Tue, 8 Jan 2013 19:38:51 +0000 (+0000) Subject: gdb: x86: fix x32 builds with inline asm X-Git-Tag: sid-snapshot-20130201~274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdad4180179ebc7c1be31c0bf03769358a7b01bc;p=thirdparty%2Fbinutils-gdb.git gdb: x86: fix x32 builds with inline asm 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 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ba8772c244..3928ac63f88 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-01-08 Mike Frysinger + + * common/linux-ptrace.c (linux_ptrace_test_ret_to_nx) [__x86_64__]: + Cast return_address to 64bits. + 2013-01-08 Hui Zhu * printcmd.c: Remove define of function output_command. diff --git a/gdb/common/linux-ptrace.c b/gdb/common/linux-ptrace.c index 761ef597bfe..886be809d1d 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