From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17530 invoked by alias); 5 Mar 2002 15:56:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17454 invoked from network); 5 Mar 2002 15:56:25 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 5 Mar 2002 15:56:25 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id D91A459D35F for ; Tue, 5 Mar 2002 16:56:24 +0100 (CET) Received: from suse.cz (leviathan.suse.cz [10.20.1.56]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g25FuON24553 for ; Tue, 5 Mar 2002 16:56:24 +0100 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3C84EAA8.2000900@suse.cz> Date: Tue, 05 Mar 2002 07:56:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: x86-64-tdep.h cleanup Content-Type: multipart/mixed; boundary="------------000101040805050007030202" X-SW-Source: 2002-03/txt/msg00048.txt.bz2 This is a multi-part message in MIME format. --------------000101040805050007030202 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Content-length: 3238 As it was recommended by lots of people here I moved along with regmap from x86-64-tdep.h to x86-64-linux-nat.c. Also to let x86-64-tdep.h contain only #defines, I moved declarations of x86_64_linux_frame_saved_pc and x86_64_linux_saved_pc_after_call to x86-64-tdep.c. Are these changes OK to commit? Michal Ludvig Index: ChangeLog from Michal Ludvig * x86-64-tdep.h (sys/reg.h, x86_64_regmap): Moved to x86-64-linux-nat.c (x86_64_linux_frame_saved_pc, x86_64_linux_saved_pc_after_call): Moved to x86-64-tdep.c * x86-64-linux-nat.c (sys/reg.h, x86_64_regmap): Moved here from x86-64-tdep.h * x86-64-tdep.c (x86_64_linux_frame_saved_pc, x86_64_linux_saved_pc_after_call): Moved here from x86-64-tdep.h Index: x86-64-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v retrieving revision 1.1 diff -c -3 -p -r1.1 x86-64-tdep.h *** x86-64-tdep.h 2001/09/21 12:19:15 1.1 --- x86-64-tdep.h 2002/03/05 15:03:37 *************** *** 24,49 **** #define X86_64_TDEP_H #include "i386-tdep.h" - #include - /* Mapping between the general-purpose registers in `struct user' - format and GDB's register array layout. */ - - static int x86_64_regmap[] = { - RAX, RDX, RCX, RBX, - RSI, RDI, RBP, RSP, - R8, R9, R10, R11, - R12, R13, R14, R15, - RIP, EFLAGS - }; - /* Number of all registers */ #define X86_64_NUM_REGS (51) /* Number of general registers. */ #define X86_64_NUM_GREGS (18) - - gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc; - gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call; #endif --- 24,34 ---- Index: x86-64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v retrieving revision 1.5 diff -c -3 -p -r1.5 x86-64-linux-nat.c *** x86-64-linux-nat.c 2002/02/24 22:14:33 1.5 --- x86-64-linux-nat.c 2002/03/05 15:03:37 *************** *** 33,39 **** --- 33,51 ---- #include #include #include + #include + /* Mapping between the general-purpose registers in `struct user' + format and GDB's register array layout. */ + + static int x86_64_regmap[] = { + RAX, RDX, RCX, RBX, + RSI, RDI, RBP, RSP, + R8, R9, R10, R11, + R12, R13, R14, R15, + RIP, EFLAGS + }; + static unsigned long x86_64_linux_dr_get (int regnum) { Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.10 diff -c -3 -p -r1.10 x86-64-tdep.c *** x86-64-tdep.c 2002/03/04 11:08:28 1.10 --- x86-64-tdep.c 2002/03/05 15:03:37 *************** int x86_64_register_raw_size_table[X86_6 *** 59,64 **** --- 59,69 ---- 4 }; + /* Prototypes of some functions from x86-64-linux-tdep.c */ + + gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc; + gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call; + /* Number of bytes of storage in the actual machine representation for register REGNO. */ int Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz --------------000101040805050007030202 Content-Type: text/plain; name="x8664-01.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x8664-01.diff" Content-length: 2405 Index: x86-64-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v retrieving revision 1.1 diff -c -3 -p -r1.1 x86-64-tdep.h *** x86-64-tdep.h 2001/09/21 12:19:15 1.1 --- x86-64-tdep.h 2002/03/05 15:03:37 *************** *** 24,49 **** #define X86_64_TDEP_H #include "i386-tdep.h" - #include - /* Mapping between the general-purpose registers in `struct user' - format and GDB's register array layout. */ - - static int x86_64_regmap[] = { - RAX, RDX, RCX, RBX, - RSI, RDI, RBP, RSP, - R8, R9, R10, R11, - R12, R13, R14, R15, - RIP, EFLAGS - }; - /* Number of all registers */ #define X86_64_NUM_REGS (51) /* Number of general registers. */ #define X86_64_NUM_GREGS (18) - - gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc; - gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call; #endif --- 24,34 ---- Index: x86-64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v retrieving revision 1.5 diff -c -3 -p -r1.5 x86-64-linux-nat.c *** x86-64-linux-nat.c 2002/02/24 22:14:33 1.5 --- x86-64-linux-nat.c 2002/03/05 15:03:37 *************** *** 33,39 **** --- 33,51 ---- #include #include #include + #include + /* Mapping between the general-purpose registers in `struct user' + format and GDB's register array layout. */ + + static int x86_64_regmap[] = { + RAX, RDX, RCX, RBX, + RSI, RDI, RBP, RSP, + R8, R9, R10, R11, + R12, R13, R14, R15, + RIP, EFLAGS + }; + static unsigned long x86_64_linux_dr_get (int regnum) { Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.10 diff -c -3 -p -r1.10 x86-64-tdep.c *** x86-64-tdep.c 2002/03/04 11:08:28 1.10 --- x86-64-tdep.c 2002/03/05 15:03:37 *************** int x86_64_register_raw_size_table[X86_6 *** 59,64 **** --- 59,69 ---- 4 }; + /* Prototypes of some functions from x86-64-linux-tdep.c */ + + gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc; + gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call; + /* Number of bytes of storage in the actual machine representation for register REGNO. */ int --------------000101040805050007030202--