From 8695c747d81a46944b5e7fbf91a29e60bc75ec8a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sat, 19 Aug 2006 15:15:18 +0000 Subject: gdb/ * Makefile.in (amd64_linux_tdep_h): New. (amd64-linux-nat.o, amd64-linux-tdep.o): Update. * amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Add ORIG_RAX. (_initialize_amd64_linux_nat): Set amd64_native_gregset64_num_regs. * amd64-linux-tdep.c (amd64_linux_register_name) (amd64_linux_register_type, amd64_linux_register_reggroup_p) (amd64_linux_write_pc): New. (amd64_linux_init_abi): Use them, and update num_regs. * amd64-linux-tdep.h: New file. * amd64-tdep.c (amd64_register_name, amd64_register_type): Make public. * amd64-tdep.h (amd64_register_name, amd64_register_type): New prototypes. * regformats/reg-x86-64-linux.dat: New file. gdb/testsuite/ * Makefile.in (clean): Clean reg-x86-64-linux.c. (reg-x86-64-linux.o, reg-x86-64-linux.c): New. * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o. * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX. (x86_64_fill_gregset, x86_64_store_gregset): Skip floating point registers. --- gdb/amd64-linux-tdep.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gdb/amd64-linux-tdep.h (limited to 'gdb/amd64-linux-tdep.h') diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h new file mode 100644 index 0000000..4a5778d --- /dev/null +++ b/gdb/amd64-linux-tdep.h @@ -0,0 +1,36 @@ +/* Target-dependent code for GNU/Linux AMD64. + + Copyright (C) 2006 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +#ifndef AMD64_LINUX_TDEP_H +#define AMD64_LINUX_TDEP_H + +/* Like for i386 GNU/Linux, there is an extra "register" + used to control syscall restarting. */ + +/* 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_MXCSR_REGNUM + 1) + +/* Total number of registers for GNU/Linux. */ +#define AMD64_LINUX_NUM_REGS (AMD64_LINUX_ORIG_RAX_REGNUM + 1) + +#endif /* amd64-linux-tdep.h */ -- cgit v1.1