* gdb.base/help.exp: Allow Win32 child process.
[deliverable/binutils-gdb.git] / gdb / vax-tdep.c
index b915b6662880671cfc145fb38207a7960771dd69..f5cd2676e85843b794bd4056acaa39618ae5f4e4 100644 (file)
@@ -43,18 +43,15 @@ static gdbarch_skip_prologue_ftype vax_skip_prologue;
 static gdbarch_saved_pc_after_call_ftype vax_saved_pc_after_call;
 static gdbarch_frame_num_args_ftype vax_frame_num_args;
 static gdbarch_frame_chain_ftype vax_frame_chain;
-static gdbarch_frame_saved_pc_ftype vax_frame_saved_pc;
 static gdbarch_frame_args_address_ftype vax_frame_args_address;
 static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
-static gdbarch_frame_init_saved_regs_ftype vax_frame_init_saved_regs;
 
 static gdbarch_store_struct_return_ftype vax_store_struct_return;
 static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
 static gdbarch_deprecated_extract_struct_value_address_ftype
     vax_extract_struct_value_address;
 
-static gdbarch_push_dummy_frame_ftype vax_push_dummy_frame;
-static gdbarch_pop_frame_ftype vax_pop_frame;
+static gdbarch_deprecated_push_dummy_frame_ftype vax_push_dummy_frame;
 static gdbarch_fix_call_dummy_ftype vax_fix_call_dummy;
 
 /* Return 1 if P points to an invalid floating point value.
@@ -135,9 +132,9 @@ vax_frame_init_saved_regs (struct frame_info *frame)
 
   frame_saved_regs_zalloc (frame);
 
-  regmask = read_memory_integer (frame->frame + 4, 4) >> 16;
+  regmask = read_memory_integer (get_frame_base (frame) + 4, 4) >> 16;
 
-  next_addr = frame->frame + 16;
+  next_addr = get_frame_base (frame) + 16;
 
   /* regmask's low bit is for register 0, which is the first one
      what would be pushed.  */
@@ -152,10 +149,10 @@ vax_frame_init_saved_regs (struct frame_info *frame)
     get_frame_saved_regs (frame)[SP_REGNUM] +=
       4 + (4 * read_memory_integer (next_addr + 4, 4));
 
-  get_frame_saved_regs (frame)[PC_REGNUM] = frame->frame + 16;
-  get_frame_saved_regs (frame)[FP_REGNUM] = frame->frame + 12;
-  get_frame_saved_regs (frame)[VAX_AP_REGNUM] = frame->frame + 8;
-  get_frame_saved_regs (frame)[PS_REGNUM] = frame->frame + 4;
+  get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16;
+  get_frame_saved_regs (frame)[FP_REGNUM] = get_frame_base (frame) + 12;
+  get_frame_saved_regs (frame)[VAX_AP_REGNUM] = get_frame_base (frame) + 8;
+  get_frame_saved_regs (frame)[PS_REGNUM] = get_frame_base (frame) + 4;
 }
 
 /* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp.  */
@@ -170,9 +167,10 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
 
   buf = alloca (ptrbytes);
   /* Get sigcontext address, it is the third parameter on the stack.  */
-  if (frame->next)
+  if (get_next_frame (frame))
     sigcontext_addr = read_memory_typed_address
-      (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
+      (FRAME_ARGS_ADDRESS (get_next_frame (frame))
+       + FRAME_ARGS_SKIP + sigcontext_offs,
        builtin_type_void_data_ptr);
   else
     sigcontext_addr = read_memory_typed_address
@@ -190,7 +188,7 @@ vax_frame_saved_pc (struct frame_info *frame)
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
     return (vax_sigtramp_saved_pc (frame)); /* XXXJRT */
 
-  return (read_memory_integer (frame->frame + 16, 4));
+  return (read_memory_integer (get_frame_base (frame) + 16, 4));
 }
 
 CORE_ADDR
@@ -205,8 +203,8 @@ vax_frame_args_address_correct (struct frame_info *frame)
      (which is one reason that "info frame" exists).  So, return 0 (indicating
      we don't know the address of the arglist) if we don't know what frame
      this frame calls.  */
-  if (frame->next)
-    return (read_memory_integer (frame->next->frame + 8, 4));
+  if (get_next_frame (frame))
+    return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
 
   return (0);
 }
@@ -217,8 +215,8 @@ vax_frame_args_address (struct frame_info *frame)
   /* In most of GDB, getting the args address is too important to
      just say "I don't know".  This is sometimes wrong for functions
      that aren't on top of the stack, but c'est la vie.  */
-  if (frame->next)
-    return (read_memory_integer (frame->next->frame + 8, 4));
+  if (get_next_frame (frame))
+    return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
 
   return (read_register (VAX_AP_REGNUM));
 }
@@ -226,7 +224,7 @@ vax_frame_args_address (struct frame_info *frame)
 static CORE_ADDR
 vax_frame_locals_address (struct frame_info *frame)
 {
-  return (frame->frame);
+  return (get_frame_base (frame));
 }
 
 static int
@@ -243,7 +241,7 @@ vax_frame_chain (struct frame_info *frame)
   if (inside_entry_file (get_frame_pc (frame)))
     return (0);
 
-  return (read_memory_integer (frame->frame + 12, 4));
+  return (read_memory_integer (get_frame_base (frame) + 12, 4));
 }
 \f
 static void
@@ -375,7 +373,7 @@ vax_skip_prologue (CORE_ADDR pc)
 static CORE_ADDR
 vax_saved_pc_after_call (struct frame_info *frame)
 {
-  return (FRAME_SAVED_PC(frame));
+  return (DEPRECATED_FRAME_SAVED_PC(frame));
 }
 \f
 /* Print the vax instruction at address MEMADDR in debugged memory,
@@ -635,9 +633,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_register_bytes (gdbarch, VAX_REGISTER_BYTES);
   set_gdbarch_register_byte (gdbarch, vax_register_byte);
   set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size);
-  set_gdbarch_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
+  set_gdbarch_deprecated_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
   set_gdbarch_register_virtual_size (gdbarch, vax_register_virtual_size);
-  set_gdbarch_max_register_virtual_size (gdbarch,
+  set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
                                          VAX_MAX_REGISTER_VIRTUAL_SIZE);
   set_gdbarch_register_virtual_type (gdbarch, vax_register_virtual_type);
 
@@ -650,12 +648,12 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
                                   generic_frameless_function_invocation_not);
 
   set_gdbarch_frame_chain (gdbarch, vax_frame_chain);
-  set_gdbarch_frame_saved_pc (gdbarch, vax_frame_saved_pc);
+  set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
 
   set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
   set_gdbarch_frame_locals_address (gdbarch, vax_frame_locals_address);
 
-  set_gdbarch_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
+  set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
 
   set_gdbarch_frame_args_skip (gdbarch, 4);
 
@@ -668,8 +666,8 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
 
   /* Call dummy info */
-  set_gdbarch_push_dummy_frame (gdbarch, vax_push_dummy_frame);
-  set_gdbarch_pop_frame (gdbarch, vax_pop_frame);
+  set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame);
+  set_gdbarch_deprecated_pop_frame (gdbarch, vax_pop_frame);
   set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, vax_call_dummy_words);
This page took 0.030771 seconds and 4 git commands to generate.