From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21495 invoked by alias); 12 Nov 2008 12:43:40 -0000 Received: (qmail 21431 invoked by uid 22791); 12 Nov 2008 12:43:39 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Nov 2008 12:42:43 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id mACCgGUp027498; Wed, 12 Nov 2008 13:42:16 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id mACCgGit009483; Wed, 12 Nov 2008 13:42:16 +0100 (CET) Date: Wed, 12 Nov 2008 16:39:00 -0000 Message-Id: <200811121242.mACCgGit009483@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: gingold@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20081112101250.GA18396@ulanbator.act-europe.fr> (message from Tristan Gingold on Wed, 12 Nov 2008 11:12:50 +0100) Subject: Re: [RFA] Darwin/x86 port (v2 - part 3: i386-darwin files) References: <20081112101250.GA18396@ulanbator.act-europe.fr> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00232.txt.bz2 > Date: Wed, 12 Nov 2008 11:12:50 +0100 > From: Tristan Gingold > > i386-darwin-tdep.h: > > /* Target-dependent code for Darwin x86. > > Copyright (C) 2008 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 3 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, see . */ > #ifndef __I386_DARWIN_TDEP_H__ > #define __I386_DARWIN_TDEP_H__ > > #include > > #define IS_GP_REGNUM(regno) ((regno >= FIRST_GP_REGNUM) && (regno <= LAST_GP_REGNUM)) > #define IS_FP_REGNUM(regno) ((regno >= FIRST_FP_REGNUM) && (regno <= LAST_FP_REGNUM)) > #define IS_VP_REGNUM(regno) ((regno >= FIRST_VP_REGNUM) && (regno <= LAST_VP_REGNUM)) > > #define FIRST_GP_REGNUM 0 > #define LAST_GP_REGNUM 15 > #define NUM_GP_REGS ((LAST_GP_REGNUM + 1) - FIRST_GP_REGNUM) > > #define FIRST_FP_REGNUM 16 > #define LAST_FP_REGNUM 31 > #define NUM_FP_REGS ((LAST_FP_REGNUM + 1) - FIRST_FP_REGNUM) > > #define FIRST_VP_REGNUM 32 > #define LAST_VP_REGNUM 40 > #define NUM_VP_REGS ((LAST_VP_REGNUM + 1) - FIRST_VP_REGNUM) > > #define IS_GP_REGNUM_64(regno) ((regno >= FIRST_GP_REGNUM_64) && (regno <= LAST_GP_REGNUM_64)) > #define IS_FP_REGNUM_64(regno) ((regno >= FIRST_FP_REGNUM_64) && (regno <= LAST_FP_REGNUM_64)) > #define IS_VP_REGNUM_64(regno) ((regno >= FIRST_VP_REGNUM_64) && (regno <= LAST_VP_REGNUM_64)) > > #define FIRST_GP_REGNUM_64 0 > #define LAST_GP_REGNUM_64 23 > #define NUM_GP_REGS_64 ((LAST_GP_REGNUM_64 + 1) - FIRST_GP_REGNUM_64) > > #define FIRST_FP_REGNUM_64 24 > #define LAST_FP_REGNUM_64 39 > #define NUM_FP_REGS_64 ((LAST_FP_REGNUM_64 + 1) - FIRST_FP_REGNUM_64) > > #define FIRST_VP_REGNUM_64 40 > #define LAST_VP_REGNUM_64 55 > #define NUM_VP_REGS_64 ((LAST_VP_REGNUM_64 + 1) - FIRST_VP_REGNUM_64) > > void i386_darwin_fetch_gp_registers (struct regcache *regcache, i386_thread_state_t *sp_regs); > void i386_darwin_store_gp_registers (struct regcache *regcache, i386_thread_state_t *sp_regs); > void x86_64_darwin_fetch_gp_registers (struct regcache *regcache, x86_thread_state64_t *sp_regs); > void x86_64_darwin_store_gp_registers (struct regcache *regcache, x86_thread_state64_t *sp_regs); > void i386_darwin_fetch_fp_registers (struct regcache *regcache, i386_float_state_t *fp_regs); > int i386_darwin_store_fp_registers (struct regcache *regcache, i386_float_state_t *fp_regs); > void x86_64_darwin_fetch_fp_registers (struct regcache *regcache, x86_float_state64_t *fp_regs); > int x86_64_darwin_store_fp_registers (struct regcache *regcache, x86_float_state64_t *fp_regs); Can you do a s/x86_64/amd64/ on the function/variable names in your new code? That's more consistent with other code in GDB. > #define INVALID_ADDRESS ((CORE_ADDR) (-1)) As far as I can tell, this define isn't used. Can you remove it?