This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] amd64: simplify addition of new general registers.
- From: Walfred Tedeschi <wtedeschi at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Jan 2017 14:20:41 -0000
- Subject: [binutils-gdb] amd64: simplify addition of new general registers.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8884e97e78f337bccb50df7682333db4e7ee1542
commit 8884e97e78f337bccb50df7682333db4e7ee1542
Author: Walfred Tedeschi <walfred.tedeschi@intel.com>
Date: Fri Jan 27 15:19:13 2017 +0100
amd64: simplify addition of new general registers.
The purpose of this patch is only simplify the addition of new registers.
ORIG_RAX is kept as last register and any addition is done right before it.
2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
Set to AMD64_NUM_REGS.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/amd64-linux-tdep.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 401372c..d4af52a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
+ * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
+ Set to AMD64_NUM_REGS.
+
+2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
+
* amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
that checks validity of a register number.
diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
index 5d032a6..7c53fda 100644
--- a/gdb/amd64-linux-tdep.h
+++ b/gdb/amd64-linux-tdep.h
@@ -26,7 +26,7 @@
/* Register number for the "orig_rax" register. If this register
contains a value >= 0 it is interpreted as the system call number
that the kernel is supposed to restart. */
-#define AMD64_LINUX_ORIG_RAX_REGNUM (AMD64_ZMM31H_REGNUM + 1)
+#define AMD64_LINUX_ORIG_RAX_REGNUM AMD64_NUM_REGS
/* Total number of registers for GNU/Linux. */
#define AMD64_LINUX_NUM_REGS (AMD64_LINUX_ORIG_RAX_REGNUM + 1)