gdb/main.h - gdb

Data types defined

Macros defined

Source code

  1. /* Main interface for GDB, the GNU debugger.

  2.    Copyright (C) 2002-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

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

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

  14. #ifndef MAIN_H
  15. #define MAIN_H

  16. struct captured_main_args
  17. {
  18.   int argc;
  19.   char **argv;
  20.   const char *interpreter_p;
  21. };

  22. extern int gdb_main (struct captured_main_args *);

  23. /* From main.c.  */
  24. extern int return_child_result;
  25. extern int return_child_result_value;
  26. extern int batch_silent;
  27. extern int batch_flag;

  28. /* From mingw-hdep.c, used by main.c.  */

  29. /* Return argv[0] in absolute form, if possible, or ARGV0 if not.  The
  30.    return value is in malloc'ed storage.  */
  31. extern char *windows_get_absolute_argv0 (const char *argv0);

  32. /* Return read only pointer to the name of gdb as it was invoked.  This
  33.    might have been expanded to an absolute path if required by the
  34.    platform.  Could return NULL if called before gdb has had a chance to
  35.    parse the argv array.  */
  36. extern const char *get_gdb_program_name (void);

  37. extern void set_gdb_data_directory (const char *new_data_dir);

  38. #endif