* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / inferior.h
index ce92228096edf92b16f6af2fdeaa2a4f1607b5f8..576fcff8b01f8a72e82aa9d9e9c276422f8e271f 100644 (file)
@@ -81,6 +81,11 @@ extern int inferior_pid;
 
 extern char registers[];
 
+/* Array of validity bits (one per register).  Nonzero at position XXX_REGNUM
+   means that `registers' contains a valid copy of inferior register XXX.  */
+
+extern char register_valid[NUM_REGS];
+
 extern void
 clear_proceed_status PARAMS ((void));
 
@@ -90,9 +95,6 @@ proceed PARAMS ((CORE_ADDR, int, int));
 extern void
 kill_inferior PARAMS ((void));
 
-extern void
-kill_inferior_fast PARAMS ((void));
-
 extern void
 generic_mourn_inferior PARAMS ((void));
 
@@ -120,6 +122,11 @@ close_exec_file PARAMS ((void));
 extern void
 reopen_exec_file PARAMS ((void));
 
+/* The `resume' routine should only be called in special circumstances.
+   Normally, use `proceed', which handles a lot of bookkeeping.  */
+extern void
+resume PARAMS ((int, int));
+
 /* From misc files */
 
 extern void
@@ -131,9 +138,6 @@ fetch_inferior_registers PARAMS ((int));
 extern void 
 solib_create_inferior_hook PARAMS ((void));
 
-extern void
-child_mourn_inferior PARAMS ((void));
-
 extern void
 child_terminal_info PARAMS ((char *, int));
 
@@ -149,7 +153,7 @@ terminal_inferior PARAMS ((void));
 extern void
 terminal_init_inferior PARAMS ((void));
 
-/* From infptrace.c or procfs.c */
+/* From infptrace.c */
 
 extern int
 attach PARAMS ((int));
@@ -160,26 +164,24 @@ detach PARAMS ((int));
 extern void
 child_resume PARAMS ((int, int));
 
-/* From procfs.c */
-
-#ifdef USE_PROC_FS
+#ifndef PTRACE_ARG3_TYPE
+#define PTRACE_ARG3_TYPE int   /* Correct definition for most systems. */
+#endif
 
 extern int
-proc_iterate_over_mappings PARAMS ((int (*) (int, CORE_ADDR)));
+call_ptrace PARAMS ((int, int, PTRACE_ARG3_TYPE, int));
 
-extern int
-proc_wait PARAMS ((int *));
+/* From procfs.c */
 
-extern void
-inferior_proc_init PARAMS ((int));
+extern int
+proc_iterate_over_mappings PARAMS ((int (*) (int, CORE_ADDR)));
 
-extern void
-proc_signal_handling_change PARAMS ((void));
+/* From fork-child.c */
 
 extern void
-proc_set_exec_trap PARAMS ((void));
-
-#endif
+fork_inferior PARAMS ((char *, char *, char **,
+                      void (*) (void),
+                      void (*) (int)));
 
 /* From inflow.c */
 
@@ -191,12 +193,6 @@ new_tty_prefork PARAMS ((char *));
 extern void
 start_remote PARAMS ((void));
 
-extern void
-child_create_inferior PARAMS ((char *, char *, char **));
-
-extern void
-child_attach PARAMS ((char *, int));
-
 extern void
 normal_stop PARAMS ((void));
 
@@ -321,16 +317,27 @@ extern int attach_flag;
 extern CORE_ADDR text_end;
 #define PC_IN_CALL_DUMMY(pc, sp, frame_address) \
   ((pc) >= text_end - CALL_DUMMY_LENGTH         \
-   && (pc) < text_end + DECR_PC_AFTER_BREAK)
+   && (pc) <= text_end + DECR_PC_AFTER_BREAK)
 #else /* Not before text_end.  */
 #if CALL_DUMMY_LOCATION == AFTER_TEXT_END
 extern CORE_ADDR text_end;
 #define PC_IN_CALL_DUMMY(pc, sp, frame_address) \
   ((pc) >= text_end   \
-   && (pc) < text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK)
+   && (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK)
 #else /* On stack.  */
+
+/* This assumes that frame_address is the value of SP_REGNUM before
+   the dummy frame was pushed.  The only known machine for which this
+   isn't true is the 29k, which doesn't use ON_STACK.  Machines for
+   which it isn't true who want to put stack dummies on the stack
+   could provide their own PC_IN_CALL_DUMMY, or perhaps this macro
+   could be re-written to check for the end of the stack instead
+   (using the target_ops->sections).  Are there user programs, libraries,
+   kernel routines, etc. which also execute on the stack?  If so, the
+   latter would be a bad idea.  */
+
 #define PC_IN_CALL_DUMMY(pc, sp, frame_address) \
-  ((sp) INNER_THAN (pc) && (pc) INNER_THAN (frame_address))
+  ((sp) INNER_THAN (pc) && (frame_address != 0) && (pc) INNER_THAN (frame_address))
 #endif /* On stack.  */
 #endif /* Not before text_end.  */
 #endif /* No PC_IN_CALL_DUMMY.  */
This page took 0.024479 seconds and 4 git commands to generate.