Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: gingold@adacore.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Darwin/x86 port (v2 - part 3: i386-darwin files)
Date: Wed, 12 Nov 2008 16:39:00 -0000	[thread overview]
Message-ID: <200811121242.mACCgGit009483@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <20081112101250.GA18396@ulanbator.act-europe.fr> (message from 	Tristan Gingold on Wed, 12 Nov 2008 11:12:50 +0100)

> Date: Wed, 12 Nov 2008 11:12:50 +0100
> From: Tristan Gingold <gingold@adacore.com>
> 
> 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 <http://www.gnu.org/licenses/>.  */
> #ifndef __I386_DARWIN_TDEP_H__
> #define __I386_DARWIN_TDEP_H__
> 
> #include <mach/thread_status.h>
> 
> #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?


  parent reply	other threads:[~2008-11-12 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 18:40 Tristan Gingold
2008-11-12 12:43 ` Tristan Gingold
2008-11-12 16:39 ` Mark Kettenis [this message]
2008-11-12 17:21   ` Tristan Gingold
2008-11-12 20:21 ` Tristan Gingold
2008-11-13 14:53 ` Tristan Gingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811121242.mACCgGit009483@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=gingold@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox