diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-01-08 19:38:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-01-08 19:38:51 +0000 |
commit | bdad4180179ebc7c1be31c0bf03769358a7b01bc (patch) | |
tree | 5c9d8c5e2c6e280a03ad6086efbb3528d415417b /gdb/common | |
parent | a3251895a6c76c3f3a1e8535ea776b9029263253 (diff) | |
download | gdb-bdad4180179ebc7c1be31c0bf03769358a7b01bc.zip gdb-bdad4180179ebc7c1be31c0bf03769358a7b01bc.tar.gz gdb-bdad4180179ebc7c1be31c0bf03769358a7b01bc.tar.bz2 |
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 <vapier@gentoo.org>
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/linux-ptrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |