gdb-3.5
[deliverable/binutils-gdb.git] / gdb / inferior.h
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.
4
5 This file is part of GDB.
6
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)
10 any later version.
11
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.
16
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. */
20
21 /*
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
27 * control variables.
28 */
29 struct inferior_status {
30 int pc_changed;
31 int stop_signal;
32 int stop_pc;
33 int stop_frame_address;
34 int stop_breakpoint;
35 int stop_step;
36 int stop_stack_dummy;
37 int stopped_by_random_signal;
38 int trap_expected;
39 CORE_ADDR step_range_start;
40 CORE_ADDR step_range_end;
41 FRAME_ADDR step_frame_address;
42 int step_over_calls;
43 CORE_ADDR step_resume_break_address;
44 int stop_after_trap;
45 int stop_after_attach;
46 FRAME_ADDR selected_frame_address;
47 int selected_level;
48 struct command_line *breakpoint_commands;
49 char stop_registers[REGISTER_BYTES];
50 int restore_stack_info;
51 };
52
53 void save_inferior_status (), restore_inferior_status ();
54
55 /* File name for default use for standard in/out in the inferior. */
56
57 extern char *inferior_io_terminal;
58
59 /* Pid of our debugged inferior, or 0 if no inferior now. */
60
61 extern int inferior_pid;
62
63 /* Nonzero if debugging a remote machine via a serial link or ethernet. */
64 extern int remote_debugging;
65
66 /* Routines for use in remote debugging. Documented in remote.c. */
67 int remote_read_inferior_memory ();
68 int remote_write_inferior_memory ();
69
70 /* Last signal that the inferior received (why it stopped). */
71
72 extern int stop_signal;
73
74 /* Address at which inferior stopped. */
75
76 extern CORE_ADDR stop_pc;
77
78 /* Stack frame when program stopped. */
79
80 extern FRAME_ADDR stop_frame_address;
81
82 /* Number of breakpoint it stopped at, or 0 if none. */
83
84 extern int stop_breakpoint;
85
86 /* Nonzero if stopped due to a step command. */
87
88 extern int stop_step;
89
90 /* Nonzero if stopped due to completion of a stack dummy routine. */
91
92 extern int stop_stack_dummy;
93
94 /* Nonzero if program stopped due to a random (unexpected) signal in
95 inferior process. */
96
97 extern int stopped_by_random_signal;
98
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. */
102
103 extern CORE_ADDR step_range_start; /* Inclusive */
104 extern CORE_ADDR step_range_end; /* Exclusive */
105
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. */
109
110 extern FRAME_ADDR step_frame_address;
111
112 /* 1 means step over all subroutine calls.
113 -1 means step over calls to undebuggable functions. */
114
115 extern int step_over_calls;
116
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. */
120
121 extern int step_multi;
122
123 /* Save register contents here when about to pop a stack dummy frame. */
124
125 extern char stop_registers[REGISTER_BYTES];
126
127 /* Nonzero if pc has been changed by the debugger
128 since the inferior stopped. */
129
130 extern int pc_changed;
131
132 long read_memory_integer ();
This page took 0.035079 seconds and 4 git commands to generate.