gdb-3.5
[deliverable/binutils-gdb.git] / gdb / inferior.h
CommitLineData
7b4ac7e1 1/* Variables that describe the inferior process running under GDB:
2 Where it is, why it stopped, and how to step it.
4187119d 3 Copyright (C) 1986, 1989 Free Software Foundation, Inc.
7b4ac7e1 4
4187119d 5This file is part of GDB.
7b4ac7e1 6
4187119d 7GDB is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 1, or (at your option)
10any later version.
7b4ac7e1 11
4187119d 12GDB is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GDB; see the file COPYING. If not, write to
19the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
7b4ac7e1 20
e91b87a3 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 */
29struct 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
53void save_inferior_status (), restore_inferior_status ();
54
7b4ac7e1 55/* File name for default use for standard in/out in the inferior. */
56
57extern char *inferior_io_terminal;
58
59/* Pid of our debugged inferior, or 0 if no inferior now. */
60
61extern int inferior_pid;
62
632ea0cc 63/* Nonzero if debugging a remote machine via a serial link or ethernet. */
632ea0cc 64extern int remote_debugging;
65
4187119d 66/* Routines for use in remote debugging. Documented in remote.c. */
67int remote_read_inferior_memory ();
68int remote_write_inferior_memory ();
69
7b4ac7e1 70/* Last signal that the inferior received (why it stopped). */
71
72extern int stop_signal;
73
74/* Address at which inferior stopped. */
75
76extern CORE_ADDR stop_pc;
77
78/* Stack frame when program stopped. */
79
e91b87a3 80extern FRAME_ADDR stop_frame_address;
7b4ac7e1 81
82/* Number of breakpoint it stopped at, or 0 if none. */
83
84extern int stop_breakpoint;
85
86/* Nonzero if stopped due to a step command. */
87
88extern int stop_step;
89
90/* Nonzero if stopped due to completion of a stack dummy routine. */
91
92extern int stop_stack_dummy;
93
e91b87a3 94/* Nonzero if program stopped due to a random (unexpected) signal in
95 inferior process. */
96
97extern int stopped_by_random_signal;
98
7b4ac7e1 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
103extern CORE_ADDR step_range_start; /* Inclusive */
104extern 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
e91b87a3 110extern FRAME_ADDR step_frame_address;
7b4ac7e1 111
112/* 1 means step over all subroutine calls.
113 -1 means step over calls to undebuggable functions. */
114
115extern 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
121extern int step_multi;
122
123/* Save register contents here when about to pop a stack dummy frame. */
124
125extern char stop_registers[REGISTER_BYTES];
126
127/* Nonzero if pc has been changed by the debugger
128 since the inferior stopped. */
129
130extern int pc_changed;
e91b87a3 131
e91b87a3 132long read_memory_integer ();
This page took 0.029199 seconds and 4 git commands to generate.