home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Atari / Gnu / gdb36p4s.zoo / defs.h < prev    next >
C/C++ Source or Header  |  1993-04-03  |  3KB  |  104 lines

  1. /* Basic definitions for GDB, the GNU debugger.
  2.    Copyright (C) 1986, 1989 Free Software Foundation, Inc.
  3.  
  4. This file is part of GDB.
  5.  
  6. GDB is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GDB is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GDB; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  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.  
  25. extern char *savestring ();
  26. extern char *concat ();
  27. extern char *xmalloc (), *xrealloc ();
  28. extern int parse_escape ();
  29. extern char *reg_names[];
  30.  
  31. /* Various possibilities for alloca.  */
  32. #ifdef __GNUC__
  33. #define alloca __builtin_alloca
  34. #else
  35. #ifdef sparc
  36. #include <alloca.h>
  37. #else
  38. extern char *alloca ();
  39. #endif
  40. #endif
  41.  
  42. extern int quit_flag;
  43.  
  44. extern int immediate_quit;
  45.  
  46. #define QUIT { if (quit_flag) quit (); }
  47.  
  48. /* Notes on classes: class_alias is for alias commands which are not
  49.    abbreviations of the original command.  */
  50.  
  51. enum command_class
  52. {
  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,
  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.  
  68. struct cleanup
  69. {
  70.   struct cleanup *next;
  71.   void (*function) ();
  72.   int arg;
  73. };
  74.  
  75. extern void do_cleanups ();
  76. extern void discard_cleanups ();
  77. extern struct cleanup *make_cleanup ();
  78. extern struct cleanup *save_cleanups ();
  79. extern void restore_cleanups ();
  80. extern void free_current_contents ();
  81. extern void reinitialize_more_filter ();
  82. extern void fputs_filtered ();
  83. extern void fprintf_filtered ();
  84. extern void printf_filtered ();
  85. extern void print_spaces_filtered ();
  86. extern void print_demangled ();
  87. extern char *tilde_expand ();
  88.  
  89. /* Structure for saved commands lines
  90.    (for breakpoints, defined commands, etc).  */
  91.  
  92. struct command_line
  93. {
  94.   struct command_line *next;
  95.   char *line;
  96. };
  97.  
  98. struct command_line *read_command_lines ();
  99.  
  100. /* String containing the current directory (what getwd would return).  */
  101.  
  102. char *current_directory;
  103.  
  104.