gdb/defs.h - gdb

Data types defined

Macros defined

Source code

  1. /* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
  2.                       for now.  */
  3. /* Basic, host-specific, and target-specific definitions for GDB.
  4.    Copyright (C) 1986-2015 Free Software Foundation, Inc.

  5.    This file is part of GDB.

  6.    This program 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 3 of the License, or
  9.    (at your option) any later version.

  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.

  14.    You should have received a copy of the GNU General Public License
  15.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  16. #ifndef DEFS_H
  17. #define DEFS_H

  18. #ifdef GDBSERVER
  19. error gdbserver should not include gdb/defs.h
  20. #endif

  21. #include "common-defs.h"

  22. #include <sys/types.h>
  23. #include <limits.h>
  24. #include <stdint.h>

  25. /* The libdecnumber library, on which GDB depends, includes a header file
  26.    called gstdint.h instead of relying directly on stdint.h.  GDB, on the
  27.    other hand, includes stdint.h directly, relying on the fact that gnulib
  28.    generates a copy if the system doesn't provide one or if it is missing
  29.    some features.  Unfortunately, gstdint.h and stdint.h cannot be included
  30.    at the same time, which may happen when we include a file from
  31.    libdecnumber.

  32.    The following macro definition effectively prevents the inclusion of
  33.    gstdint.h, as all the definitions it provides are guarded against
  34.    the GCC_GENERATED_STDINT_H macro.  We already have gnulib/stdint.h
  35.    included, so it's ok to blank out gstdint.h.  */
  36. #define GCC_GENERATED_STDINT_H 1

  37. #include <unistd.h>

  38. #include <fcntl.h>

  39. #include "gdb_wchar.h"

  40. #include "ui-file.h"

  41. #include "host-defs.h"

  42. /* Scope types enumerator.  List the types of scopes the compiler will
  43.    accept.  */

  44. enum compile_i_scope_types
  45.   {
  46.     COMPILE_I_INVALID_SCOPE,

  47.     /* A simple scope.  Wrap an expression into a simple scope that
  48.        takes no arguments, returns no value, and uses the generic
  49.        function name "_gdb_expr". */

  50.     COMPILE_I_SIMPLE_SCOPE,

  51.     /* Do not wrap the expression,
  52.        it has to provide function "_gdb_expr" on its own.  */
  53.     COMPILE_I_RAW_SCOPE,
  54.   };

  55. /* Just in case they're not defined in stdio.h.  */

  56. #ifndef SEEK_SET
  57. #define SEEK_SET 0
  58. #endif
  59. #ifndef SEEK_CUR
  60. #define SEEK_CUR 1
  61. #endif

  62. /* The O_BINARY flag is defined in fcntl.h on some non-Posix platforms.
  63.    It is used as an access modifier in calls to open(), where it acts
  64.    similarly to the "b" character in fopen()'s MODE argument.  On Posix
  65.    platforms it should be a no-op, so it is defined as 0 here.  This
  66.    ensures that the symbol may be used freely elsewhere in gdb.  */

  67. #ifndef O_BINARY
  68. #define O_BINARY 0
  69. #endif

  70. #include "hashtab.h"

  71. #ifndef min
  72. #define min(a, b) ((a) < (b) ? (a) : (b))
  73. #endif
  74. #ifndef max
  75. #define max(a, b) ((a) > (b) ? (a) : (b))
  76. #endif

  77. /* * Enable xdb commands if set.  */
  78. extern int xdb_commands;

  79. /* * Enable dbx commands if set.  */
  80. extern int dbx_commands;

  81. /* * System root path, used to find libraries etc.  */
  82. extern char *gdb_sysroot;

  83. /* * GDB datadir, used to store data files.  */
  84. extern char *gdb_datadir;

  85. /* * If non-NULL, the possibly relocated path to python's "lib" directory
  86.    specified with --with-python.  */
  87. extern char *python_libdir;

  88. /* * Search path for separate debug files.  */
  89. extern char *debug_file_directory;

  90. /* GDB has two methods for handling SIGINT.  When immediate_quit is
  91.    nonzero, a SIGINT results in an immediate longjmp out of the signal
  92.    handler.  Otherwise, SIGINT simply sets a flag; code that might
  93.    take a long time, and which ought to be interruptible, checks this
  94.    flag using the QUIT macro.

  95.    These functions use the extension_language_ops API to allow extension
  96.    language(s) and GDB SIGINT handling to coexist seamlessly.  */

  97. /* * Clear the quit flag.  */
  98. extern void clear_quit_flag (void);
  99. /* * Evaluate to non-zero if the quit flag is set, zero otherwise.  This
  100.    will clear the quit flag as a side effect.  */
  101. extern int check_quit_flag (void);
  102. /* * Set the quit flag.  */
  103. extern void set_quit_flag (void);

  104. /* Flag that function quit should call quit_force.  */
  105. extern volatile int sync_quit_force_run;

  106. extern int immediate_quit;

  107. extern void quit (void);

  108. /* FIXME: cagney/2000-03-13: It has been suggested that the peformance
  109.    benefits of having a ``QUIT'' macro rather than a function are
  110.    marginal.  If the overhead of a QUIT function call is proving
  111.    significant then its calling frequency should probably be reduced
  112.    [kingdon].  A profile analyzing the current situtation is
  113.    needed.  */

  114. #define QUIT { \
  115.   if (check_quit_flag () || sync_quit_force_run) quit (); \
  116.   if (deprecated_interactive_hook) deprecated_interactive_hook (); \
  117. }

  118. /* * Languages represented in the symbol table and elsewhere.
  119.    This should probably be in language.h, but since enum's can't
  120.    be forward declared to satisfy opaque references before their
  121.    actual definition, needs to be here.  */

  122. enum language
  123.   {
  124.     language_unknown,                /* Language not known */
  125.     language_auto,                /* Placeholder for automatic setting */
  126.     language_c,                        /* C */
  127.     language_cplus,                /* C++ */
  128.     language_d,                        /* D */
  129.     language_go,                /* Go */
  130.     language_objc,                /* Objective-C */
  131.     language_java,                /* Java */
  132.     language_fortran,                /* Fortran */
  133.     language_m2,                /* Modula-2 */
  134.     language_asm,                /* Assembly language */
  135.     language_pascal,                /* Pascal */
  136.     language_ada,                /* Ada */
  137.     language_opencl,                /* OpenCL */
  138.     language_minimal,                /* All other languages, minimal support only */
  139.     nr_languages
  140.   };

  141. enum precision_type
  142.   {
  143.     single_precision,
  144.     double_precision,
  145.     unspecified_precision
  146.   };

  147. /* * A generic, not quite boolean, enumeration.  This is used for
  148.    set/show commands in which the options are on/off/automatic.  */
  149. enum auto_boolean
  150. {
  151.   AUTO_BOOLEAN_TRUE,
  152.   AUTO_BOOLEAN_FALSE,
  153.   AUTO_BOOLEAN_AUTO
  154. };

  155. /* * Potential ways that a function can return a value of a given
  156.    type.  */

  157. enum return_value_convention
  158. {
  159.   /* * Where the return value has been squeezed into one or more
  160.      registers.  */
  161.   RETURN_VALUE_REGISTER_CONVENTION,
  162.   /* * Commonly known as the "struct return convention".  The caller
  163.      passes an additional hidden first parameter to the caller.  That
  164.      parameter contains the address at which the value being returned
  165.      should be stored.  While typically, and historically, used for
  166.      large structs, this is convention is applied to values of many
  167.      different types.  */
  168.   RETURN_VALUE_STRUCT_CONVENTION,
  169.   /* * Like the "struct return convention" above, but where the ABI
  170.      guarantees that the called function stores the address at which
  171.      the value being returned is stored in a well-defined location,
  172.      such as a register or memory slot in the stack frame.  Don't use
  173.      this if the ABI doesn't explicitly guarantees this.  */
  174.   RETURN_VALUE_ABI_RETURNS_ADDRESS,
  175.   /* * Like the "struct return convention" above, but where the ABI
  176.      guarantees that the address at which the value being returned is
  177.      stored will be available in a well-defined location, such as a
  178.      register or memory slot in the stack frame.  Don't use this if
  179.      the ABI doesn't explicitly guarantees this.  */
  180.   RETURN_VALUE_ABI_PRESERVES_ADDRESS,
  181. };

  182. /* Needed for various prototypes */

  183. struct symtab;
  184. struct breakpoint;
  185. struct frame_info;
  186. struct gdbarch;
  187. struct value;

  188. /* From main.c.  */

  189. /* This really belong in utils.c (path-utils.c?), but it references some
  190.    globals that are currently only available to main.c.  */
  191. extern char *relocate_gdb_directory (const char *initial, int flag);


  192. /* Annotation stuff.  */

  193. extern int annotation_level;        /* in stack.c */


  194. /* From regex.c or libc.  BSD 4.4 declares this with the argument type as
  195.    "const char *" in unistd.h, so we can't declare the argument
  196.    as "char *".  */

  197. extern char *re_comp (const char *);

  198. /* From symfile.c */

  199. extern void symbol_file_command (char *, int);

  200. /* * Remote targets may wish to use this as their load function.  */
  201. extern void generic_load (const char *name, int from_tty);

  202. /* * Report on STREAM the performance of memory transfer operation,
  203.    such as 'load'.
  204.    @param DATA_COUNT is the number of bytes transferred.
  205.    @param WRITE_COUNT is the number of separate write operations, or 0,
  206.    if that information is not available.
  207.    @param START_TIME is the time at which an operation was started.
  208.    @param END_TIME is the time at which an operation ended.  */
  209. struct timeval;
  210. extern void print_transfer_performance (struct ui_file *stream,
  211.                                         unsigned long data_count,
  212.                                         unsigned long write_count,
  213.                                         const struct timeval *start_time,
  214.                                         const struct timeval *end_time);

  215. /* From top.c */

  216. typedef void initialize_file_ftype (void);

  217. extern char *gdb_readline (const char *);

  218. extern char *gdb_readline_wrapper (const char *);

  219. extern char *command_line_input (const char *, int, char *);

  220. extern void print_prompt (void);

  221. extern int input_from_terminal_p (void);

  222. extern int info_verbose;

  223. /* From printcmd.c */

  224. extern void set_next_address (struct gdbarch *, CORE_ADDR);

  225. extern int print_address_symbolic (struct gdbarch *, CORE_ADDR,
  226.                                    struct ui_file *, int, char *);

  227. extern int build_address_symbolic (struct gdbarch *,
  228.                                    CORE_ADDR addr,
  229.                                    int do_demangle,
  230.                                    char **name,
  231.                                    int *offset,
  232.                                    char **filename,
  233.                                    int *line,
  234.                                    int *unmapped);

  235. extern void print_address (struct gdbarch *, CORE_ADDR, struct ui_file *);
  236. extern const char *pc_prefix (CORE_ADDR);

  237. /* From source.c */

  238. /* See openp function definition for their description.  */
  239. #define OPF_TRY_CWD_FIRST     0x01
  240. #define OPF_SEARCH_IN_PATH    0x02
  241. #define OPF_RETURN_REALPATH   0x04

  242. extern int openp (const char *, int, const char *, int, char **);

  243. extern int source_full_path_of (const char *, char **);

  244. extern void mod_path (char *, char **);

  245. extern void add_path (char *, char **, int);

  246. extern void directory_switch (char *, int);

  247. extern char *source_path;

  248. extern void init_source_path (void);

  249. /* From exec.c */

  250. /* * Process memory area starting at ADDR with length SIZE.  Area is
  251.    readable iff READ is non-zero, writable if WRITE is non-zero,
  252.    executable if EXEC is non-zero.  Area is possibly changed against
  253.    its original file based copy if MODIFIED is non-zero.  DATA is
  254.    passed without changes from a caller.  */

  255. typedef int (*find_memory_region_ftype) (CORE_ADDR addr, unsigned long size,
  256.                                          int read, int write, int exec,
  257.                                          int modified, void *data);

  258. /* * Possible lvalue types.  Like enum language, this should be in
  259.    value.h, but needs to be here for the same reason.  */

  260. enum lval_type
  261.   {
  262.     /* * Not an lval.  */
  263.     not_lval,
  264.     /* * In memory.  */
  265.     lval_memory,
  266.     /* * In a register.  Registers are relative to a frame.  */
  267.     lval_register,
  268.     /* * In a gdb internal variable.  */
  269.     lval_internalvar,
  270.     /* * Value encapsulates a callable defined in an extension language.  */
  271.     lval_xcallable,
  272.     /* * Part of a gdb internal variable (structure field).  */
  273.     lval_internalvar_component,
  274.     /* * Value's bits are fetched and stored using functions provided
  275.        by its creator.  */
  276.     lval_computed
  277.   };

  278. /* * Control types for commands.  */

  279. enum misc_command_type
  280.   {
  281.     ok_command,
  282.     end_command,
  283.     else_command,
  284.     nop_command
  285.   };

  286. enum command_control_type
  287.   {
  288.     simple_control,
  289.     break_control,
  290.     continue_control,
  291.     while_control,
  292.     if_control,
  293.     commands_control,
  294.     python_control,
  295.     compile_control,
  296.     guile_control,
  297.     while_stepping_control,
  298.     invalid_control
  299.   };

  300. /* * Structure for saved commands lines (for breakpoints, defined
  301.    commands, etc).  */

  302. struct command_line
  303.   {
  304.     struct command_line *next;
  305.     char *line;
  306.     enum command_control_type control_type;
  307.     union
  308.       {
  309.         struct
  310.           {
  311.             enum compile_i_scope_types scope;
  312.           }
  313.         compile;
  314.       }
  315.     control_u;
  316.     /* * The number of elements in body_list.  */
  317.     int body_count;
  318.     /* * For composite commands, the nested lists of commands.  For
  319.        example, for "if" command this will contain the then branch and
  320.        the else branch, if that is available.  */
  321.     struct command_line **body_list;
  322.   };

  323. extern struct command_line *read_command_lines (char *, int, int,
  324.                                                 void (*)(char *, void *),
  325.                                                 void *);
  326. extern struct command_line *read_command_lines_1 (char * (*) (void), int,
  327.                                                   void (*)(char *, void *),
  328.                                                   void *);

  329. extern void free_command_lines (struct command_line **);

  330. /* * Parameters of the "info proc" command.  */

  331. enum info_proc_what
  332.   {
  333.     /* * Display the default cmdline, cwd and exe outputs.  */
  334.     IP_MINIMAL,

  335.     /* * Display `info proc mappings'.  */
  336.     IP_MAPPINGS,

  337.     /* * Display `info proc status'.  */
  338.     IP_STATUS,

  339.     /* * Display `info proc stat'.  */
  340.     IP_STAT,

  341.     /* * Display `info proc cmdline'.  */
  342.     IP_CMDLINE,

  343.     /* * Display `info proc exe'.  */
  344.     IP_EXE,

  345.     /* * Display `info proc cwd'.  */
  346.     IP_CWD,

  347.     /* * Display all of the above.  */
  348.     IP_ALL
  349.   };

  350. /* * String containing the current directory (what getwd would return).  */

  351. extern char *current_directory;

  352. /* * Default radixes for input and output.  Only some values supported.  */
  353. extern unsigned input_radix;
  354. extern unsigned output_radix;

  355. /* * Possibilities for prettyformat parameters to routines which print
  356.    things.  Like enum language, this should be in value.h, but needs
  357.    to be here for the same reason.  FIXME:  If we can eliminate this
  358.    as an arg to LA_VAL_PRINT, then we can probably move it back to
  359.    value.h.  */

  360. enum val_prettyformat
  361.   {
  362.     Val_no_prettyformat = 0,
  363.     Val_prettyformat,
  364.     /* * Use the default setting which the user has specified.  */
  365.     Val_prettyformat_default
  366.   };

  367. /* * Optional native machine support.  Non-native (and possibly pure
  368.    multi-arch) targets do not need a "nm.h" file.  This will be a
  369.    symlink to one of the nm-*.h files, built by the `configure'
  370.    script.  */

  371. #ifdef GDB_NM_FILE
  372. #include "nm.h"
  373. #endif

  374. /* Assume that fopen accepts the letter "b" in the mode string.
  375.    It is demanded by ISO C9X, and should be supported on all
  376.    platforms that claim to have a standard-conforming C library.  On
  377.    true POSIX systems it will be ignored and have no effect.  There
  378.    may still be systems without a standard-conforming C library where
  379.    an ISO C9X compiler (GCC) is available.  Known examples are SunOS
  380.    4.x and 4.3BSD.  This assumption means these systems are no longer
  381.    supported.  */
  382. #ifndef FOPEN_RB
  383. # include "fopen-bin.h"
  384. #endif

  385. /* Defaults for system-wide constants (if not defined by xm.h, we fake it).
  386.    FIXME: Assumes 2's complement arithmetic.  */

  387. #if !defined (UINT_MAX)
  388. #define        UINT_MAX ((unsigned int)(~0))            /* 0xFFFFFFFF for 32-bits */
  389. #endif

  390. #if !defined (INT_MAX)
  391. #define        INT_MAX ((int)(UINT_MAX >> 1))            /* 0x7FFFFFFF for 32-bits */
  392. #endif

  393. #if !defined (INT_MIN)
  394. #define INT_MIN ((int)((int) ~0 ^ INT_MAX)) /* 0x80000000 for 32-bits */
  395. #endif

  396. #if !defined (ULONG_MAX)
  397. #define        ULONG_MAX ((unsigned long)(~0L))    /* 0xFFFFFFFF for 32-bits */
  398. #endif

  399. #if !defined (LONG_MAX)
  400. #define        LONG_MAX ((long)(ULONG_MAX >> 1))   /* 0x7FFFFFFF for 32-bits */
  401. #endif

  402. #if !defined (ULONGEST_MAX)
  403. #define        ULONGEST_MAX (~(ULONGEST)0)        /* 0xFFFFFFFFFFFFFFFF for 64-bits */
  404. #endif

  405. #if !defined (LONGEST_MAX)                 /* 0x7FFFFFFFFFFFFFFF for 64-bits */
  406. #define        LONGEST_MAX ((LONGEST)(ULONGEST_MAX >> 1))
  407. #endif

  408. /* * Convert a LONGEST to an int.  This is used in contexts (e.g. number of
  409.    arguments to a function, number in a value history, register number, etc.)
  410.    where the value must not be larger than can fit in an int.  */

  411. extern int longest_to_int (LONGEST);

  412. /* * List of known OS ABIs.  If you change this, make sure to update the
  413.    table in osabi.c.  */
  414. enum gdb_osabi
  415. {
  416.   GDB_OSABI_UNINITIALIZED = -1, /* For struct gdbarch_info.  */

  417.   GDB_OSABI_UNKNOWN = 0,        /* keep this zero */

  418.   GDB_OSABI_SVR4,
  419.   GDB_OSABI_HURD,
  420.   GDB_OSABI_SOLARIS,
  421.   GDB_OSABI_LINUX,
  422.   GDB_OSABI_FREEBSD_AOUT,
  423.   GDB_OSABI_FREEBSD_ELF,
  424.   GDB_OSABI_NETBSD_AOUT,
  425.   GDB_OSABI_NETBSD_ELF,
  426.   GDB_OSABI_OPENBSD_ELF,
  427.   GDB_OSABI_WINCE,
  428.   GDB_OSABI_GO32,
  429.   GDB_OSABI_IRIX,
  430.   GDB_OSABI_HPUX_ELF,
  431.   GDB_OSABI_HPUX_SOM,
  432.   GDB_OSABI_QNXNTO,
  433.   GDB_OSABI_CYGWIN,
  434.   GDB_OSABI_AIX,
  435.   GDB_OSABI_DICOS,
  436.   GDB_OSABI_DARWIN,
  437.   GDB_OSABI_SYMBIAN,
  438.   GDB_OSABI_OPENVMS,
  439.   GDB_OSABI_LYNXOS178,
  440.   GDB_OSABI_NEWLIB,
  441.   GDB_OSABI_SDE,

  442.   GDB_OSABI_INVALID                /* keep this last */
  443. };

  444. /* Global functions from other, non-gdb GNU thingies.
  445.    Libiberty thingies are no longer declared here.  We include libiberty.h
  446.    above, instead.  */

  447. /* From other system libraries */

  448. #ifndef atof
  449. extern double atof (const char *);        /* X3.159-1989  4.10.1.1 */
  450. #endif

  451. /* Dynamic target-system-dependent parameters for GDB.  */
  452. #include "gdbarch.h"

  453. /* * Maximum size of a register.  Something small, but large enough for
  454.    all known ISAs.  If it turns out to be too small, make it bigger.  */

  455. enum { MAX_REGISTER_SIZE = 64 };

  456. /* Static target-system-dependent parameters for GDB.  */

  457. /* * Number of bits in a char or unsigned char for the target machine.
  458.    Just like CHAR_BIT in <limits.h> but describes the target machine.  */
  459. #if !defined (TARGET_CHAR_BIT)
  460. #define TARGET_CHAR_BIT 8
  461. #endif

  462. /* * If we picked up a copy of CHAR_BIT from a configuration file
  463.    (which may get it by including <limits.h>) then use it to set
  464.    the number of bits in a host char.  If not, use the same size
  465.    as the target.  */

  466. #if defined (CHAR_BIT)
  467. #define HOST_CHAR_BIT CHAR_BIT
  468. #else
  469. #define HOST_CHAR_BIT TARGET_CHAR_BIT
  470. #endif

  471. /* In findvar.c.  */

  472. extern LONGEST extract_signed_integer (const gdb_byte *, int,
  473.                                        enum bfd_endian);

  474. extern ULONGEST extract_unsigned_integer (const gdb_byte *, int,
  475.                                           enum bfd_endian);

  476. extern int extract_long_unsigned_integer (const gdb_byte *, int,
  477.                                           enum bfd_endian, LONGEST *);

  478. extern CORE_ADDR extract_typed_address (const gdb_byte *buf,
  479.                                         struct type *type);

  480. extern void store_signed_integer (gdb_byte *, int,
  481.                                   enum bfd_endian, LONGEST);

  482. extern void store_unsigned_integer (gdb_byte *, int,
  483.                                     enum bfd_endian, ULONGEST);

  484. extern void store_typed_address (gdb_byte *buf, struct type *type,
  485.                                  CORE_ADDR addr);


  486. /* From valops.c */

  487. extern int watchdog;

  488. /* Hooks for alternate command interfaces.  */

  489. /* * The name of the interpreter if specified on the command line.  */
  490. extern char *interpreter_p;

  491. /* If a given interpreter matches INTERPRETER_P then it should update
  492.    deprecated_init_ui_hook with the per-interpreter implementation.  */
  493. /* FIXME: deprecated_init_ui_hook should be moved here.  */

  494. struct target_waitstatus;
  495. struct cmd_list_element;

  496. extern void (*deprecated_pre_add_symbol_hook) (const char *);
  497. extern void (*deprecated_post_add_symbol_hook) (void);
  498. extern void (*selected_frame_level_changed_hook) (int);
  499. extern int (*deprecated_ui_loop_hook) (int signo);
  500. extern void (*deprecated_init_ui_hook) (char *argv0);
  501. extern void (*deprecated_show_load_progress) (const char *section,
  502.                                               unsigned long section_sent,
  503.                                               unsigned long section_size,
  504.                                               unsigned long total_sent,
  505.                                               unsigned long total_size);
  506. extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
  507.                                                          int line,
  508.                                                          int stopline,
  509.                                                          int noerror);
  510. extern int (*deprecated_query_hook) (const char *, va_list)
  511.      ATTRIBUTE_FPTR_PRINTF(1,0);
  512. extern void (*deprecated_warning_hook) (const char *, va_list)
  513.      ATTRIBUTE_FPTR_PRINTF(1,0);
  514. extern void (*deprecated_interactive_hook) (void);
  515. extern void (*deprecated_readline_begin_hook) (char *, ...)
  516.      ATTRIBUTE_FPTR_PRINTF_1;
  517. extern char *(*deprecated_readline_hook) (const char *);
  518. extern void (*deprecated_readline_end_hook) (void);
  519. extern void (*deprecated_register_changed_hook) (int regno);
  520. extern void (*deprecated_context_hook) (int);
  521. extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
  522.                                               struct target_waitstatus *status,
  523.                                               int options);

  524. extern void (*deprecated_attach_hook) (void);
  525. extern void (*deprecated_detach_hook) (void);
  526. extern void (*deprecated_call_command_hook) (struct cmd_list_element * c,
  527.                                              char *cmd, int from_tty);

  528. extern int (*deprecated_ui_load_progress_hook) (const char *section,
  529.                                                 unsigned long num);

  530. /* If this definition isn't overridden by the header files, assume
  531.    that isatty and fileno exist on this system.  */
  532. #ifndef ISATTY
  533. #define ISATTY(FP)        (isatty (fileno (FP)))
  534. #endif

  535. /* * A width that can achieve a better legibility for GDB MI mode.  */
  536. #define GDB_MI_MSG_WIDTH  80

  537. /* From progspace.c */

  538. extern void initialize_progspace (void);
  539. extern void initialize_inferiors (void);

  540. /* * Special block numbers */

  541. enum block_enum
  542. {
  543.   GLOBAL_BLOCK = 0,
  544.   STATIC_BLOCK = 1,
  545.   FIRST_LOCAL_BLOCK = 2
  546. };

  547. #include "utils.h"

  548. #endif /* #ifndef DEFS_H */