xref: /dragonfly/contrib/gdb-7/gdb/gdb.h (revision ef5ccd6c)
15796c8dcSSimon Schubert /* Library interface into GDB.
2*ef5ccd6cSJohn Marino    Copyright (C) 1999-2013 Free Software Foundation, Inc.
35796c8dcSSimon Schubert 
45796c8dcSSimon Schubert    This file is part of GDB.
55796c8dcSSimon Schubert 
65796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
75796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
85796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
95796c8dcSSimon Schubert    (at your option) any later version.
105796c8dcSSimon Schubert 
115796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
125796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
135796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
145796c8dcSSimon Schubert    GNU General Public License for more details.
155796c8dcSSimon Schubert 
165796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
175796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
185796c8dcSSimon Schubert 
195796c8dcSSimon Schubert #ifndef GDB_H
205796c8dcSSimon Schubert #define GDB_H
215796c8dcSSimon Schubert 
225796c8dcSSimon Schubert struct ui_out;
235796c8dcSSimon Schubert 
245796c8dcSSimon Schubert /* Return-code (RC) from a gdb library call.  (The abreviation RC is
255796c8dcSSimon Schubert    taken from the sim/common directory.) */
265796c8dcSSimon Schubert 
275796c8dcSSimon Schubert enum gdb_rc {
285796c8dcSSimon Schubert   /* The operation failed.  The failure message can be fetched by
295796c8dcSSimon Schubert      calling ``char *error_last_message(void)''.  The value is
305796c8dcSSimon Schubert      determined by the catch_errors() interface.  The MSG parameter is
315796c8dcSSimon Schubert      set to a freshly allocated copy of the error message.  */
325796c8dcSSimon Schubert   /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
335796c8dcSSimon Schubert      internal / quit indication it is not possible to return that
345796c8dcSSimon Schubert      here.  */
355796c8dcSSimon Schubert   GDB_RC_FAIL = 0,
365796c8dcSSimon Schubert   /* No error occured but nothing happened.  Due to the catch_errors()
375796c8dcSSimon Schubert      interface, this must be non-zero.  */
385796c8dcSSimon Schubert   GDB_RC_NONE = 1,
395796c8dcSSimon Schubert   /* The operation was successful.  Due to the catch_errors()
405796c8dcSSimon Schubert      interface, this must be non-zero.  */
415796c8dcSSimon Schubert   GDB_RC_OK = 2
425796c8dcSSimon Schubert };
435796c8dcSSimon Schubert 
445796c8dcSSimon Schubert 
455796c8dcSSimon Schubert /* Print the specified breakpoint on GDB_STDOUT.  (Eventually this
465796c8dcSSimon Schubert    function will ``print'' the object on ``output'').  */
475796c8dcSSimon Schubert enum gdb_rc gdb_breakpoint_query (struct ui_out *uiout, int bnum,
485796c8dcSSimon Schubert 				  char **error_message);
495796c8dcSSimon Schubert 
505796c8dcSSimon Schubert /* Switch thread and print notification.  */
515796c8dcSSimon Schubert enum gdb_rc gdb_thread_select (struct ui_out *uiout, char *tidstr,
525796c8dcSSimon Schubert 			       char **error_message);
535796c8dcSSimon Schubert 
545796c8dcSSimon Schubert /* Print a list of known thread ids.  */
555796c8dcSSimon Schubert enum gdb_rc gdb_list_thread_ids (struct ui_out *uiout,
565796c8dcSSimon Schubert 				 char **error_message);
575796c8dcSSimon Schubert 
585796c8dcSSimon Schubert #endif
59