aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/nat/linux-ptrace.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 08c7c6c..4283cbb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
+ sp clobbers.
+
2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
* dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
index d4c1b8f..187cfeb 100644
--- a/gdb/nat/linux-ptrace.c
+++ b/gdb/nat/linux-ptrace.c
@@ -161,14 +161,14 @@ 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) : "%esp", "memory");
+ : : "r" (return_address) : "memory");
#elif defined __x86_64__
asm volatile ("pushq %0;"
".globl linux_ptrace_test_ret_to_nx_instr;"
"linux_ptrace_test_ret_to_nx_instr:"
"ret"
: : "r" ((uint64_t) (uintptr_t) return_address)
- : "%rsp", "memory");
+ : "memory");
#else
# error "!__i386__ && !__x86_64__"
#endif