gdb-3.1
[deliverable/binutils-gdb.git] / gdb / defs.h
1 /* Basic definitions for GDB, the GNU debugger.
2 Copyright (C) 1986 Free Software Foundation, Inc.
3
4 GDB is distributed in the hope that it will be useful, but WITHOUT ANY
5 WARRANTY. No author or distributor accepts responsibility to anyone
6 for the consequences of using it or for whether it serves any
7 particular purpose or works at all, unless he says so in writing.
8 Refer to the GDB General Public License for full details.
9
10 Everyone is granted permission to copy, modify and redistribute GDB,
11 but only under the conditions described in the GDB General Public
12 License. A copy of this license is supposed to have been given to you
13 along with GDB so you can know your rights and responsibilities. It
14 should be in a file named COPYING. Among other things, the copyright
15 notice and this notice must be preserved on all copies.
16
17 In other words, go ahead and share GDB, but don't try to stop
18 anyone else from sharing it farther. Help stamp out software hoarding!
19 */
20
21 #define CORE_ADDR unsigned int
22
23 #define min(a, b) ((a) < (b) ? (a) : (b))
24 #define max(a, b) ((a) > (b) ? (a) : (b))
25
26 extern char *savestring ();
27 extern char *concat ();
28 extern char *xmalloc (), *xrealloc ();
29 extern char *alloca ();
30 extern int parse_escape ();
31 extern char *reg_names[];
32
33 extern int quit_flag;
34
35 extern int immediate_quit;
36
37 #define QUIT { if (quit_flag) quit (); }
38
39 enum command_class
40 {
41 no_class = -1, class_run = 0, class_vars, class_stack,
42 class_files, class_support, class_info, class_breakpoint,
43 class_alias, class_obscure, class_user,
44 };
45
46 /* the cleanup list records things that have to be undone
47 if an error happens (descriptors to be closed, memory to be freed, etc.)
48 Each link in the chain records a function to call and an
49 argument to give it.
50
51 Use make_cleanup to add an element to the cleanup chain.
52 Use do_cleanups to do all cleanup actions back to a given
53 point in the chain. Use discard_cleanups to remove cleanups
54 from the chain back to a given point, not doing them. */
55
56 struct cleanup
57 {
58 struct cleanup *next;
59 void (*function) ();
60 int arg;
61 };
62
63 extern void do_cleanups ();
64 extern void discard_cleanups ();
65 extern struct cleanup *make_cleanup ();
66 extern struct cleanup *save_cleanups ();
67 extern void restore_cleanups ();
68 extern void free_current_contents ();
69
70 /* Structure for saved commands lines
71 (for breakpoints, defined commands, etc). */
72
73 struct command_line
74 {
75 struct command_line *next;
76 char *line;
77 };
78
79 struct command_line *read_command_lines ();
80
81 /* String containing the current directory (what getwd would return). */
82
83 char *current_directory;
84
85 #ifdef sparc
86 #include <alloca.h>
87 #endif
88
This page took 0.034594 seconds and 5 git commands to generate.