gdb-3.5
[deliverable/binutils-gdb.git] / gdb / defs.h
CommitLineData
7b4ac7e1 1/* Basic definitions for GDB, the GNU debugger.
4187119d 2 Copyright (C) 1986, 1989 Free Software Foundation, Inc.
7b4ac7e1 3
4187119d 4This file is part of GDB.
7b4ac7e1 5
4187119d 6GDB is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
7b4ac7e1 10
4187119d 11GDB is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GDB; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
7b4ac7e1 19
20#define CORE_ADDR unsigned int
21
22#define min(a, b) ((a) < (b) ? (a) : (b))
23#define max(a, b) ((a) > (b) ? (a) : (b))
24
25extern char *savestring ();
26extern char *concat ();
27extern char *xmalloc (), *xrealloc ();
28extern int parse_escape ();
29extern char *reg_names[];
30
4187119d 31/* Various possibilities for alloca. */
32#ifdef __GNUC__
33#define alloca __builtin_alloca
34#else
35#ifdef sparc
36#include <alloca.h>
37#else
38extern char *alloca ();
39#endif
40#endif
41
7b4ac7e1 42extern int quit_flag;
43
44extern int immediate_quit;
45
46#define QUIT { if (quit_flag) quit (); }
47
4187119d 48/* Notes on classes: class_alias is for alias commands which are not
49 abbreviations of the original command. */
50
7b4ac7e1 51enum command_class
52{
e91b87a3 53 no_class = -1, class_run = 0, class_vars, class_stack,
54 class_files, class_support, class_info, class_breakpoint,
55 class_alias, class_obscure, class_user,
7b4ac7e1 56};
57
58/* the cleanup list records things that have to be undone
59 if an error happens (descriptors to be closed, memory to be freed, etc.)
60 Each link in the chain records a function to call and an
61 argument to give it.
62
63 Use make_cleanup to add an element to the cleanup chain.
64 Use do_cleanups to do all cleanup actions back to a given
65 point in the chain. Use discard_cleanups to remove cleanups
66 from the chain back to a given point, not doing them. */
67
68struct cleanup
69{
70 struct cleanup *next;
71 void (*function) ();
72 int arg;
73};
74
75extern void do_cleanups ();
76extern void discard_cleanups ();
77extern struct cleanup *make_cleanup ();
e91b87a3 78extern struct cleanup *save_cleanups ();
79extern void restore_cleanups ();
7b4ac7e1 80extern void free_current_contents ();
4187119d 81extern void reinitialize_more_filter ();
82extern void fputs_filtered ();
83extern void fprintf_filtered ();
84extern void printf_filtered ();
85extern void print_spaces_filtered ();
86extern char *tilde_expand ();
7b4ac7e1 87
88/* Structure for saved commands lines
89 (for breakpoints, defined commands, etc). */
90
91struct command_line
92{
93 struct command_line *next;
94 char *line;
95};
96
97struct command_line *read_command_lines ();
632ea0cc 98
99/* String containing the current directory (what getwd would return). */
100
101char *current_directory;
bb7592f0 102
This page took 0.028049 seconds and 4 git commands to generate.