2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)stkframe.h 1.10 03/06/15 Copyright 1995 J. Schilling */
15 * Common definitions for routines that parse the stack frame.
17 * This file has to be fixed if you want to port routines which use getfp().
18 * Have a look at struct frame below and use it as a sample,
19 * the new struct frame must at least contain a member 'fr_savfp'.
22 * This program is free software; you can redistribute it and/or modify
23 * it under the terms of the GNU General Public License version 2
24 * as published by the Free Software Foundation.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License along with
32 * this program; see the file COPYING. If not, write to the Free Software
33 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 #if defined(sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__))
45 * Solaris 2.x aka SunOS 5.x
49 * On Solaris 2.1 x86 sys/frame.h is not useful at all
50 * On Solaris 2.4 x86 sys/frame.h is buggy (fr_savfp is int!!)
52 # ifndef _INCL_SYS_REG_H
54 # define _INCL_SYS_REG_H
57 # ifndef _INCL_SYS_FRAME_H
58 # include <sys/frame.h>
59 # define _INCL_SYS_FRAME_H
67 # ifndef _INCL_MACHINE_FRAME_H
68 # include <machine/frame.h>
69 # define _INCL_MACHINE_FRAME_H
73 * Anything that is not SunOS
81 * XXX: I hope this will be useful on other machines (no guarantee)
82 * XXX: It is taken from a sun Motorola system, but should also be useful
84 * XXX: In general you have to write a sample program, set a breakpoint
85 * XXX: on a small function and inspect the stackframe with adb.
89 struct frame *fr_savfp; /* saved frame pointer */
90 int fr_savpc; /* saved program counter */
91 int fr_arg[1]; /* array of arguments */
98 # endif /* ! defined (sun) */
99 #endif /* ! defined (sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__)) */
101 #endif /* _STKFRAME_H */