Replace "exec" with "executable" in messages.
[deliverable/binutils-gdb.git] / gdb / gdbtk.h
CommitLineData
ca4e7e14
JI
1/* Tcl/Tk interface routines header file.
2 Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3
4 Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
5
6This file is part of GDB. It contains the public data that is shared between
7the gdbtk startup code and the gdbtk commands.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2 of the License, or
12(at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22
23#ifdef WINNT
24#define GDBTK_PATH_SEP ";"
25#else
26#define GDBTK_PATH_SEP ":"
27#endif
28
29/* Some versions (1.3.79, 1.3.81) of Linux don't support SIOCSPGRP the way
30 gdbtk wants to use it... */
31#ifdef __linux__
32#undef SIOCSPGRP
33#endif
34
35/*
36 * These are the version numbers for GDBTK. There is a package require
37 * statement in main.tcl that checks the version. If you make an incompatible
38 * change to the gdb commands, or add any new commands, be sure to bump the
39 * version number both here and in main.tcl. This will save us the trouble of
40 * having a version of gdb find the wrong versions of the Tcl libraries.
41 */
42
43#define GDBTK_MAJOR_VERSION "1"
44#define GDBTK_MINOR_VERSION "0"
45#define GDBTK_VERSION "1.0"
46
47/*
48 * These are variables that are needed in gdbtk commands.
49 */
50
51/* This variable determines where memory used for disassembly is read from.
52 If > 0, then disassembly comes from the exec file rather than the
53 target (which might be at the other end of a slow serial link). If
54 == 0 then disassembly comes from target. If < 0 disassembly is
55 automatically switched to the target if it's an inferior process,
56 otherwise the exec file is used. It is defined in gdbtk.c */
57
58
59extern int disassemble_from_exec;
60
61/* This variable is true when the inferior is running. Although it's
62 possible to disable most input from widgets and thus prevent
63 attempts to do anything while the inferior is running, any commands
64 that get through - even a simple memory read - are Very Bad, and
65 may cause GDB to crash or behave strangely. So, this variable
66 provides an extra layer of defense. It is defined in gdbtk.c */
67
68extern int running_now;
69
70/* These two control how the GUI behaves when tracing or loading
f3b86a30 71 They are defined in gdbtk-cmds.c */
ca4e7e14
JI
72
73extern int No_Update;
74extern int load_in_progress;
75
76/* This is the main gdbtk interpreter. It is defined and initialized
77 in gdbtk.c */
78
79extern Tcl_Interp *gdbtk_interp;
80
81/*
82 * This structure controls how the gdb output is fed into call_wrapper invoked
83 * commands. See the explanation of gdbtk_fputs in gdbtk_hooks.c for more details.
84 */
85
86typedef struct gdbtk_result {
87 Tcl_Obj *obj_ptr; /* This will eventually be copied over to the
88 Tcl result */
89 int flags; /* Flag vector to control how the result is
90 used. */
91} gdbtk_result;
92
93/* These defines give the allowed values for the gdbtk_result.flags field. */
94
95#define GDBTK_TO_RESULT 1 /* This controls whether output from
96 gdbtk_fputs goes to the command result, or
97 to gdbtk_tcl_fputs. */
98#define GDBTK_MAKES_LIST 2 /* whether gdbtk_fputs adds the
99 element it is outputting as a string, or
100 as a separate list element. */
101#define GDBTK_IN_TCL_RESULT 4 /* Indicates that the result is already in the
102 Tcl result. You can use this to preserve
103 error messages from functions like
104 Tcl_GetIntFromObj. You can also store the
105 output of a call wrapped command directly in
106 the Tcl result if you want, but beware, it will
107 not then be preserved across recursive
108 call_wrapper invocations. */
109#define GDBTK_ERROR_STARTED 8 /* This one is just used in gdbtk_fputs. If we
110 see some output on stderr, we need to clear
111 the result we have been accumulating, or the
112 error and the previous successful output
113 will get mixed, which would be confusing. */
114
115
116/* This is a pointer to the gdbtk_result struct that
117 we are currently filling. We use the C stack to make a stack of these
118 structures for nested calls to gdbtk commands that are invoked through
119 the call_wrapper mechanism. See that function for more details. */
120
121extern gdbtk_result *result_ptr;
122
4ff5d55a
MH
123/* GDB context identifier */
124extern int gdb_context;
125
ca4e7e14
JI
126/*
127 * These functions are used in all the modules of Gdbtk.
128 *
129 */
130
131extern int Gdbtk_Init(Tcl_Interp *interp);
132extern void gdbtk_stop_timer PARAMS ((void));
133extern void gdbtk_start_timer PARAMS ((void));
134extern void gdbtk_ignorable_warning PARAMS ((const char *));
135extern void gdbtk_interactive PARAMS ((void));
136extern void x_event PARAMS ((int));
137extern int gdbtk_two_elem_cmd PARAMS ((char *, char *));
138
139#ifdef _WIN32
140extern void close_bfds ();
141#endif /* _WIN32 */
142
143extern void
144#ifdef ANSI_PROTOTYPES
145TclDebug (const char *fmt, ...);
146#else
147TclDebug (va_alist);
148#endif
This page took 0.049554 seconds and 4 git commands to generate.