gdb/gdb.h - gdb

Data types defined

Macros defined

Source code

  1. /* Library interface into GDB.
  2.    Copyright (C) 1999-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 GDB_H
  15. #define GDB_H

  16. struct ui_out;

  17. /* Return-code (RC) from a gdb library call.  (The abreviation RC is
  18.    taken from the sim/common directory.) */

  19. enum gdb_rc {
  20.   /* The operation failed.  The failure message can be fetched by
  21.      calling ``char *error_last_message(void)''.  The value is
  22.      determined by the catch_errors() interface.  The MSG parameter is
  23.      set to a freshly allocated copy of the error message.  */
  24.   /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
  25.      internal / quit indication it is not possible to return that
  26.      here.  */
  27.   GDB_RC_FAIL = 0,
  28.   /* No error occured but nothing happened.  Due to the catch_errors()
  29.      interface, this must be non-zero.  */
  30.   GDB_RC_NONE = 1,
  31.   /* The operation was successful.  Due to the catch_errors()
  32.      interface, this must be non-zero.  */
  33.   GDB_RC_OK = 2
  34. };


  35. /* Print the specified breakpoint on GDB_STDOUT.  (Eventually this
  36.    function will ``print'' the object on ``output'').  */
  37. enum gdb_rc gdb_breakpoint_query (struct ui_out *uiout, int bnum,
  38.                                   char **error_message);

  39. /* Switch thread and print notification.  */
  40. enum gdb_rc gdb_thread_select (struct ui_out *uiout, char *tidstr,
  41.                                char **error_message);

  42. /* Print a list of known thread ids.  */
  43. enum gdb_rc gdb_list_thread_ids (struct ui_out *uiout,
  44.                                  char **error_message);

  45. #endif