OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [i386/] [tm-i386v.h] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
/* Macro definitions for i386, Unix System V.
/* Macro definitions for i386, Unix System V.
   Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
   Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
 
 
   This file is part of GDB.
   This file is part of GDB.
 
 
   This program is free software; you can redistribute it and/or modify
   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
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */
   Boston, MA 02111-1307, USA.  */
 
 
#ifndef TM_I386V_H
#ifndef TM_I386V_H
#define TM_I386V_H 1
#define TM_I386V_H 1
 
 
/* First pick up the generic *86 target file. */
/* First pick up the generic *86 target file. */
 
 
#include "i386/tm-i386.h"
#include "i386/tm-i386.h"
 
 
/* Number of traps that happen between exec'ing the shell to run an
/* Number of traps that happen between exec'ing the shell to run an
   inferior, and when we finally get to the inferior code.  This is
   inferior, and when we finally get to the inferior code.  This is
   2 on most implementations.  Override here to 4. */
   2 on most implementations.  Override here to 4. */
 
 
#undef  START_INFERIOR_TRAPS_EXPECTED
#undef  START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 4
#define START_INFERIOR_TRAPS_EXPECTED 4
 
 
#undef  STORE_STRUCT_RETURN
#undef  STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) \
#define STORE_STRUCT_RETURN(ADDR, SP) \
  { char buf[REGISTER_SIZE];    \
  { char buf[REGISTER_SIZE];    \
    (SP) -= sizeof (ADDR);      \
    (SP) -= sizeof (ADDR);      \
    store_address (buf, sizeof (ADDR), ADDR);   \
    store_address (buf, sizeof (ADDR), ADDR);   \
    write_memory ((SP), buf, sizeof (ADDR)); }
    write_memory ((SP), buf, sizeof (ADDR)); }
 
 
/* Extract from an array REGBUF containing the (raw) register state
/* Extract from an array REGBUF containing the (raw) register state
   a function return value of type TYPE, and copy that, in virtual format,
   a function return value of type TYPE, and copy that, in virtual format,
   into VALBUF.  */
   into VALBUF.  */
 
 
#undef  EXTRACT_RETURN_VALUE
#undef  EXTRACT_RETURN_VALUE
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
  memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
  memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
 
 
/* Write into appropriate registers a function return value
/* Write into appropriate registers a function return value
   of type TYPE, given in virtual format.  */
   of type TYPE, given in virtual format.  */
 
 
#undef  STORE_RETURN_VALUE
#undef  STORE_RETURN_VALUE
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
  write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
  write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))


 
 
/* Describe the pointer in each stack frame to the previous stack frame
/* Describe the pointer in each stack frame to the previous stack frame
   (its caller).  */
   (its caller).  */
 
 
/* FRAME_CHAIN takes a frame's nominal address
/* FRAME_CHAIN takes a frame's nominal address
   and produces the frame's chain-pointer. */
   and produces the frame's chain-pointer. */
 
 
#undef  FRAME_CHAIN
#undef  FRAME_CHAIN
#define FRAME_CHAIN(thisframe) \
#define FRAME_CHAIN(thisframe) \
  (!inside_entry_file ((thisframe)->pc) ? \
  (!inside_entry_file ((thisframe)->pc) ? \
   read_memory_integer ((thisframe)->frame, 4) :\
   read_memory_integer ((thisframe)->frame, 4) :\
   0)
   0)
 
 
/* Define other aspects of the stack frame.  */
/* Define other aspects of the stack frame.  */
 
 
/* A macro that tells us whether the function invocation represented
/* A macro that tells us whether the function invocation represented
   by FI does not have a frame on the stack associated with it.  If it
   by FI does not have a frame on the stack associated with it.  If it
   does not, FRAMELESS is set to 1, else 0.  */
   does not, FRAMELESS is set to 1, else 0.  */
 
 
#undef  FRAMELESS_FUNCTION_INVOCATION
#undef  FRAMELESS_FUNCTION_INVOCATION
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
  (frameless_look_for_prologue (FI))
  (frameless_look_for_prologue (FI))
 
 
#undef  FRAME_SAVED_PC
#undef  FRAME_SAVED_PC
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
 
 
/* Return number of args passed to a frame.
/* Return number of args passed to a frame.
   Can return -1, meaning no way to tell.  */
   Can return -1, meaning no way to tell.  */
 
 
#undef  FRAME_NUM_ARGS
#undef  FRAME_NUM_ARGS
#define FRAME_NUM_ARGS(fi) (-1)
#define FRAME_NUM_ARGS(fi) (-1)
 
 
/* Forward decl's for prototypes */
/* Forward decl's for prototypes */
struct frame_info;
struct frame_info;
struct frame_saved_regs;
struct frame_saved_regs;
 
 
extern int
extern int
i386_frame_num_args PARAMS ((struct frame_info *));
i386_frame_num_args PARAMS ((struct frame_info *));
 
 
#endif /* ifndef TM_I386V_H */
#endif /* ifndef TM_I386V_H */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.