X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfig%2Farc%2Ftm-arc.h;h=52ed0910437662b5fb57ab5e61db3555e433d018;hb=3fd3d7d29c5ea6ba2dff07fe353bac80fefce363;hp=e964bef1645c87220ccd156703accbcaacd085e9;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h index e964bef164..52ed091043 100644 --- a/gdb/config/arc/tm-arc.h +++ b/gdb/config/arc/tm-arc.h @@ -1,31 +1,31 @@ /* Parameters for target machine ARC, for GDB, the GNU debugger. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. -This file is part of GDB. + 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 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. + 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 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., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "regcache.h" /* Used by arc-tdep.c to set the default cpu type. */ #define DEFAULT_ARC_CPU_TYPE "base" -/* Byte order is selectable. */ -#define TARGET_BYTE_ORDER_SELECTABLE - /* We have IEEE floating point, if we have any float at all. */ -#define IEEE_FLOAT +#define IEEE_FLOAT (1) /* Offset from address of function to start of its code. Zero on most machines. */ @@ -37,11 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ knows that the function has a frame. Its result is equal to its input PC if the function is frameless, unequal otherwise. */ -#define SKIP_PROLOGUE(pc) \ - { pc = skip_prologue (pc, 0); } -#define SKIP_PROLOGUE_FRAMELESS_P(pc) \ - { pc = skip_prologue (pc, 1); } -extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int)); +#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0)) +#define SKIP_PROLOGUE_FRAMELESS_P(pc) (arc_skip_prologue (pc, 1)) +extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int); /* Sequence of bytes for breakpoint instruction. ??? The current value is "sr -1,[-1]" and is for the simulator only. @@ -62,8 +60,8 @@ extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int)); /* We don't have a reliable single step facility. ??? We do have a cycle single step facility, but that won't work. */ -#define SOFTWARE_SINGLE_STEP_P 1 -extern void arc_software_single_step PARAMS ((unsigned int, int)); +#define SOFTWARE_SINGLE_STEP_P() 1 +extern void arc_software_single_step (enum target_signal, int); #define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p) /* FIXME: Need to set STEP_SKIPS_DELAY. */ @@ -118,15 +116,15 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); /* Register numbers of various important registers (used to index into arrays of register names and register values). */ -#define R0_REGNUM 0 /* First local register */ -#define R59_REGNUM 59 /* Last local register */ -#define FP_REGNUM 27 /* Contains address of executing stack frame */ -#define SP_REGNUM 28 /* stack pointer */ -#define BLINK_REGNUM 31 /* link register */ -#define STA_REGNUM 61 /* processor status word */ -#define PC_REGNUM 91 /* instruction pointer */ -#define AUX_BEG_REGNUM 61 /* aux reg begins */ -#define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */ +#define R0_REGNUM 0 /* First local register */ +#define R59_REGNUM 59 /* Last local register */ +#define FP_REGNUM 27 /* Contains address of executing stack frame */ +#define SP_REGNUM 28 /* stack pointer */ +#define BLINK_REGNUM 31 /* link register */ +#define STA_REGNUM 61 /* processor status word */ +#define PC_REGNUM 91 /* instruction pointer */ +#define AUX_BEG_REGNUM 61 /* aux reg begins */ +#define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */ /* Fake registers used to mark immediate data. */ #define SHIMM_FLAG_REGNUM 61 @@ -160,8 +158,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); 0 \ } \ } - -#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */ + +#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */ /* Total amount of space needed to store our copies of the machine's register state, the array `registers'. */ @@ -186,8 +184,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); /* Return the GDB type object for the "standard" data type of data in register N. */ #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int) - + /* Macros for understanding function return values... */ /* Does the specified function use the "struct returning" convention @@ -209,7 +207,7 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); a function return value of type TYPE, and copy that, in virtual format, into VALBUF. This is only called if USE_STRUCT_CONVENTION for this type is 0. -*/ + */ #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE)) @@ -230,8 +228,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); subroutine will return. This is called from call_function. */ #define STORE_STRUCT_RETURN(ADDR, SP) \ error ("Returning values from functions is not implemented in arc gdb") - + /* Describe the pointer in each stack frame to the previous stack frame (its caller). */ @@ -267,24 +265,18 @@ extern void arc_software_single_step PARAMS ((unsigned int, int)); and has no caller. */ #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe) -/* 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 - does not, FRAMELESS is set to 1, else 0. */ +/* An expression that tells us whether the function invocation represented + by FI does not have a frame on the stack associated with it. */ -#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \ - do { \ - if ((FI)->signal_handler_caller) \ - (FRAMELESS) = 0; \ - else \ - (FRAMELESS) = frameless_look_for_prologue (FI); \ - } while (0) +#define FRAMELESS_FUNCTION_INVOCATION(FI) \ + (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI)) /* Where is the PC for a specific frame. A leaf function may never save blink, so we have to check for that here. */ #define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame)) -struct frame_info; /* in case frame.h not included yet */ -CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *)); +struct frame_info; /* in case frame.h not included yet */ +CORE_ADDR arc_frame_saved_pc (struct frame_info *); /* If the argument is on the stack, it will be here. We cache this value in the frame info if we've already looked it up. */ @@ -302,7 +294,7 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *)); /* Set NUMARGS to the number of args passed to a frame. Can return -1, meaning no way to tell. */ -#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1) +#define FRAME_NUM_ARGS(fi) (-1) /* Return number of bytes at start of arglist that are not really args. */ @@ -312,26 +304,28 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *)); #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \ frame_find_saved_regs (frame_info_addr, &sr) -extern void frame_find_saved_regs(); /* See arc-tdep.c */ - +extern void frame_find_saved_regs (); /* See arc-tdep.c */ + /* Things needed for making calls to functions in the inferior process */ +void arc_push_dummy_frame (void); #define PUSH_DUMMY_FRAME \ - push_dummy_frame () + arc_push_dummy_frame () /* Discard from the stack the innermost frame, restoring all registers. */ +void arc_pop_frame (void); #define POP_FRAME \ - pop_frame () + arc_pop_frame () /* This sequence of words is the instructions bl xxxx, flag 1 */ -#define CALL_DUMMY { 0x28000000, 0x1fbe8001 } +#define CALL_DUMMY { 0x28000000, 0x1fbe8001 } #define CALL_DUMMY_LENGTH 8 /* Start execution at beginning of dummy */ -#define CALL_DUMMY_START_OFFSET 0 +#define CALL_DUMMY_START_OFFSET 0 /* Insert the specified number of args and function address - into a call sequence of the above form stored at 'dummyname'.*/ + into a call sequence of the above form stored at 'dummyname'. */ #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ { \ int from, to, delta, loc; \ @@ -344,4 +338,3 @@ extern void frame_find_saved_regs(); /* See arc-tdep.c */ *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \ *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \ } -