aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-10-31 22:26:29 +0000
committerMark Kettenis <kettenis@gnu.org>2003-10-31 22:26:29 +0000
commit4c05fe5325cd1dc599999f503214fede4875e368 (patch)
tree4da20c9372c5a69b73ed5669289357b1b68d684a
parentc8b91b893c06b4e83e46a6db558c65ea2773ff7a (diff)
downloadgdb-4c05fe5325cd1dc599999f503214fede4875e368.zip
gdb-4c05fe5325cd1dc599999f503214fede4875e368.tar.gz
gdb-4c05fe5325cd1dc599999f503214fede4875e368.tar.bz2
* x86-64-linux-tdep.c (x86_64_linux_sc_reg_offset): Don't
explicitly specify size of array. (x86_64_linux_init_abi): Use ARRAY_SIZE to initialize TDEP->sc_num_regs.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/x86-64-linux-tdep.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b5b4a16..da46584 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-linux-tdep.c (x86_64_linux_sc_reg_offset): Don't
+ explicitly specify size of array.
+ (x86_64_linux_init_abi): Use ARRAY_SIZE to initialize
+ TDEP->sc_num_regs.
+
2003-10-31 Andrew Cagney <cagney@redhat.com>
* s390-tdep.c (s390_cannot_extract_struct_value_address): New
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index b45ba02..71a5364 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -234,7 +234,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
/* From <asm/sigcontext.h>. */
-static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
+static int x86_64_linux_sc_reg_offset[] =
{
13 * 8, /* %rax */
11 * 8, /* %rbx */
@@ -275,7 +275,7 @@ x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
- tdep->sc_num_regs = X86_64_NUM_GREGS;
+ tdep->sc_num_regs = ARRAY_SIZE (x86_64_linux_sc_reg_offset);
}