diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-02-21 23:45:36 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-02-21 23:45:36 +0000 |
commit | f5859b4d860963ccbeb7517f75ad2e2add4bc55b (patch) | |
tree | 3738c632b5903b5b8fd3225e5f3b0000fc5e2510 | |
parent | 1de1a3173e361471f4305b591475335d68ed3871 (diff) | |
download | gdb-f5859b4d860963ccbeb7517f75ad2e2add4bc55b.zip gdb-f5859b4d860963ccbeb7517f75ad2e2add4bc55b.tar.gz gdb-f5859b4d860963ccbeb7517f75ad2e2add4bc55b.tar.bz2 |
* x86-64-linux-nat.c (x86_64_linux_gregset32_reg_offset): Use
symbolic constants from <sys/reg.h> instead of hard-coded numbers.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/x86-64-linux-nat.c | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a9c6009..9f92812 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-02-22 Mark Kettenis <kettenis@gnu.org> + + * x86-64-linux-nat.c (x86_64_linux_gregset32_reg_offset): Use + symbolic constants from <sys/reg.h> instead of hard-coded numbers. + 2004-02-21 Mark Kettenis <kettenis@gnu.org> * configure.host: Add i[34567]86-*-openbsd[0-2].* and diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c index 98d30aa..07c463f 100644 --- a/gdb/x86-64-linux-nat.c +++ b/gdb/x86-64-linux-nat.c @@ -83,18 +83,18 @@ static int x86_64_linux_gregset64_reg_offset[] = /* From <sys/reg.h> on GNU/Linux i386. */ static int x86_64_linux_gregset32_reg_offset[] = { - 10 * 8, 11 * 8, /* %eax, %ecx */ - 12 * 8, 13 * 8, /* %edx, %ebx */ - 19 * 8, 4 * 8, /* %esp, %ebp */ - 13 * 8, 14 * 8, /* %esi, %edi */ - 16 * 8, 18 * 8, /* %eip, %eflags */ - 17 * 8, 20 * 8, /* %cs, %ss */ - 23 * 8, 24 * 8, /* %ds, %es */ - 25 * 4, 26 * 4, /* %fs, %gs */ + RAX * 8, RCX * 8, /* %eax, %ecx */ + RDX * 8, RBX * 8, /* %edx, %ebx */ + RSP * 8, RBP * 8, /* %esp, %ebp */ + RSI * 8, RDI * 8, /* %esi, %edi */ + RIP * 8, EFLAGS * 8, /* %eip, %eflags */ + CS * 8, SS * 8, /* %cs, %ss */ + DS * 8, ES * 8, /* %ds, %es */ + FS * 8, GS * 8, /* %fs, %gs */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 15 * 8 /* "orig_eax" */ + ORIG_RAX * 8 /* "orig_eax" */ }; /* Which ptrace request retrieves which registers? |