1 /* Variables that describe the inferior process running under GDB:
2 Where it is, why it stopped, and how to step it.
3 Copyright (C) 1986, 1989 Free Software Foundation, Inc.
5 This file is part of GDB.
7 GDB is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
12 GDB is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GDB; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 * Structure in which to save the status of the inferior. Save
23 * through "save_inferior_status", restore through
24 * "restore_inferior_status".
25 * This pair of routines should be called around any transfer of
26 * control to the inferior which you don't want showing up in your
29 struct inferior_status
{
33 int stop_frame_address
;
37 int stopped_by_random_signal
;
39 CORE_ADDR step_range_start
;
40 CORE_ADDR step_range_end
;
41 FRAME_ADDR step_frame_address
;
43 CORE_ADDR step_resume_break_address
;
45 int stop_after_attach
;
46 FRAME_ADDR selected_frame_address
;
48 struct command_line
*breakpoint_commands
;
49 char stop_registers
[REGISTER_BYTES
];
50 int restore_stack_info
;
53 void save_inferior_status (), restore_inferior_status ();
55 /* File name for default use for standard in/out in the inferior. */
57 extern char *inferior_io_terminal
;
59 /* Pid of our debugged inferior, or 0 if no inferior now. */
61 extern int inferior_pid
;
63 /* Nonzero if debugging a remote machine via a serial link or ethernet. */
64 extern int remote_debugging
;
66 /* Routines for use in remote debugging. Documented in remote.c. */
67 int remote_read_inferior_memory ();
68 int remote_write_inferior_memory ();
70 /* Last signal that the inferior received (why it stopped). */
72 extern int stop_signal
;
74 /* Address at which inferior stopped. */
76 extern CORE_ADDR stop_pc
;
78 /* Stack frame when program stopped. */
80 extern FRAME_ADDR stop_frame_address
;
82 /* Number of breakpoint it stopped at, or 0 if none. */
84 extern int stop_breakpoint
;
86 /* Nonzero if stopped due to a step command. */
90 /* Nonzero if stopped due to completion of a stack dummy routine. */
92 extern int stop_stack_dummy
;
94 /* Nonzero if program stopped due to a random (unexpected) signal in
97 extern int stopped_by_random_signal
;
99 /* Range to single step within.
100 If this is nonzero, respond to a single-step signal
101 by continuing to step if the pc is in this range. */
103 extern CORE_ADDR step_range_start
; /* Inclusive */
104 extern CORE_ADDR step_range_end
; /* Exclusive */
106 /* Stack frame address as of when stepping command was issued.
107 This is how we know when we step into a subroutine call,
108 and how to set the frame for the breakpoint used to step out. */
110 extern FRAME_ADDR step_frame_address
;
112 /* 1 means step over all subroutine calls.
113 -1 means step over calls to undebuggable functions. */
115 extern int step_over_calls
;
117 /* If stepping, nonzero means step count is > 1
118 so don't print frame next time inferior stops
119 if it stops due to stepping. */
121 extern int step_multi
;
123 /* Save register contents here when about to pop a stack dummy frame. */
125 extern char stop_registers
[REGISTER_BYTES
];
127 /* Nonzero if pc has been changed by the debugger
128 since the inferior stopped. */
130 extern int pc_changed
;
132 long read_memory_integer ();