/* Native-dependent definitions for FreeBSD/sparc64.
   Copyright 2002
   Free Software Foundation, Inc.
   Contributed by David E. O'Brien <obrien@FreeBSD.org>.

   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., 675 Mass Ave, Cambridge, MA 02139, USA.  */

#ifndef NM_FBSD_H
#define NM_FBSD_H

/* Type of the third argument to the `ptrace' system call.  */
#define PTRACE_ARG3_TYPE caddr_t

/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'.  */
#define FETCH_INFERIOR_REGISTERS

/* We can attach and detach.  */
#define ATTACH_DETACH


#include "regcache.h"

/* Get generic FreeBSD native definitions. */

#include "config/nm-fbsd.h"

/* Shared library support. */

#define SVR4_SHARED_LIBS

#include "solib.h"		/* Support for shared libraries. */
#include "elf/common.h"		/* Additional ELF shared library info. */

/* Before storing, we need to read all the registers.  */

#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)

#define REG32_OFFSET_GLOBAL	(0)
#define REG32_OFFSET_OUT	(32)
#define REG32_OFFSET_NPC	(96)
#define REG32_OFFSET_PC		(100)
#define REG32_OFFSET_PSR	(104)
#define REG32_OFFSET_Y		(112)
#define REG32_SIZE		(128)
#define FPREG32_SIZE		(136)

#define REG64_OFFSET_GLOBAL	(0)
#define REG64_OFFSET_OUT	(64)
#define REG64_OFFSET_NPC	(192)
#define REG64_OFFSET_PC		(200)
#define REG64_OFFSET_TSTATE	(208)
#define REG64_OFFSET_Y		(224)
#define REG64_SIZE		(256)
#define FPREG64_SIZE		(272)

#define	JB32_OFFSET_PC		REG32_OFFSET_PC
#define	JB64_OFFSET_PC		REG64_OFFSET_PC

#define	reg64	reg
#define	fpreg64	fpreg

#endif /* NM_FBSD_H */


syntax highlighted by Code2HTML, v. 0.9.1