1130803Smarcel/* Common target dependent code for GDB on Alpha systems running BSD.
2130803Smarcel   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
3130803Smarcel
4130803Smarcel   This file is part of GDB.
5130803Smarcel
6130803Smarcel   This program is free software; you can redistribute it and/or modify
7130803Smarcel   it under the terms of the GNU General Public License as published by
8130803Smarcel   the Free Software Foundation; either version 2 of the License, or
9130803Smarcel   (at your option) any later version.
10130803Smarcel
11130803Smarcel   This program is distributed in the hope that it will be useful,
12130803Smarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
13130803Smarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14130803Smarcel   GNU General Public License for more details.
15130803Smarcel
16130803Smarcel   You should have received a copy of the GNU General Public License
17130803Smarcel   along with this program; if not, write to the Free Software
18130803Smarcel   Foundation, Inc., 59 Temple Place - Suite 330,
19130803Smarcel   Boston, MA 02111-1307, USA.  */
20130803Smarcel
21130803Smarcel#include "defs.h"
22130803Smarcel
23130803Smarcel#include "alpha-tdep.h"
24130803Smarcel#include "alphabsd-tdep.h"
25130803Smarcel
26130803Smarcel/* Conviently, GDB uses the same register numbering as the
27130803Smarcel   ptrace register structure used by BSD on Alpha.  */
28130803Smarcel
29130803Smarcelvoid
30130803Smarcelalphabsd_supply_reg (char *regs, int regno)
31130803Smarcel{
32130803Smarcel  /* PC is at slot 32; UNIQUE not present.  */
33130803Smarcel  alpha_supply_int_regs (regno, regs, regs + 31*8, NULL);
34130803Smarcel}
35130803Smarcel
36130803Smarcelvoid
37130803Smarcelalphabsd_fill_reg (char *regs, int regno)
38130803Smarcel{
39130803Smarcel  /* PC is at slot 32; UNIQUE not present.  */
40130803Smarcel  alpha_fill_int_regs (regno, regs, regs + 31*8, NULL);
41130803Smarcel}
42130803Smarcel
43130803Smarcelvoid
44130803Smarcelalphabsd_supply_fpreg (char *fpregs, int regno)
45130803Smarcel{
46130803Smarcel  /* FPCR is at slot 33; slot 32 unused.  */
47130803Smarcel  alpha_supply_fp_regs (regno, fpregs, fpregs + 32*8);
48130803Smarcel}
49130803Smarcel
50130803Smarcelvoid
51130803Smarcelalphabsd_fill_fpreg (char *fpregs, int regno)
52130803Smarcel{
53130803Smarcel  /* FPCR is at slot 33; slot 32 unused.  */
54130803Smarcel  alpha_fill_fp_regs (regno, fpregs, fpregs + 32*8);
55130803Smarcel}
56