import gdb-1999-05-25 snapshot
[deliverable/binutils-gdb.git] / gdb / config / vax / tm-vax.h
index 9f2b1e4cb523394627c05eabb979a32adf4f289e..277aa8b8a41919dd09b7f1057ec0b88cdfc9167b 100644 (file)
@@ -15,7 +15,7 @@ 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.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
 #define TARGET_BYTE_ORDER LITTLE_ENDIAN
@@ -28,26 +28,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      \
-{ register int op = (unsigned char) read_memory_integer (pc, 1);  \
-  if (op == 0x11) pc += 2;  /* skip brb */                       \
-  if (op == 0x31) pc += 3;  /* skip brw */                       \
-  if (op == 0xC2 &&                                              \
-      ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E)   \
-    pc += 3;  /* skip subl2 */                                   \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE &&  \
-      ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E)    \
-     pc += 4;  /* skip movab */                                          \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE &&  \
-      ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E)    \
-    pc += 5;  /* skip movab */                                   \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xEE &&  \
-      ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5E)    \
-    pc += 7;  /* skip movab */                                   \
-}
+extern CORE_ADDR vax_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (vax_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
@@ -63,12 +45,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* On the VAX, sigtramp is in the u area.  Can't check the exact
    addresses because for cross-debugging we don't have VAX include
    files around.  This should be close enough.  */
-#define SIGTRAMP_START STACK_END_ADDR
-#define SIGTRAMP_END   0x80000000
+#define SIGTRAMP_START(pc)     STACK_END_ADDR
+#define SIGTRAMP_END(pc)       0x80000000
 
 /* Stack grows downward.  */
 
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 
 /* Sequence of bytes for breakpoint instruction.  */
 
@@ -80,10 +62,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define DECR_PC_AFTER_BREAK 0
 
-/* Nonzero if instruction at PC is a return instruction.  */
-
-#define ABOUT_TO_RETURN(pc) (read_memory_integer (pc, 1) == 04)
-
 /* Return 1 if P points to an invalid floating point value.
    LEN is the length in bytes -- not relevant on the Vax.  */
 
@@ -195,7 +173,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 /* On the vax, all functions have frames.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS)  {(FRAMELESS) = 0;}
+#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)
 
 /* Saved Pc.  Get it from sigcontext if within sigtramp.  */
 
@@ -235,8 +213,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)  \
-{ numargs = (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1)); }
+extern int vax_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS(fi) (vax_frame_num_args ((fi)))
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -309,8 +287,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
       fp += (regnum + 1) * 4; }                                         \
   write_register (SP_REGNUM, fp);                               \
   flush_cached_frames ();                                       \
-  set_current_frame (create_new_frame (read_register (FP_REGNUM),\
-                                       read_pc ())); }
+}
 
 /* This sequence of words is the instructions
      calls #69, @#32323232
This page took 0.025461 seconds and 4 git commands to generate.