xref: /openbsd-src/gnu/usr.bin/binutils/gdb/gdb.h (revision b725ae7711052a2233e31a66fefb8a752c388d7a)
1*b725ae77Skettenis /* Library interface into GDB.
2*b725ae77Skettenis    Copyright 1999, 2001
3*b725ae77Skettenis    Free Software Foundation, Inc.
4*b725ae77Skettenis 
5*b725ae77Skettenis    This file is part of GDB.
6*b725ae77Skettenis 
7*b725ae77Skettenis    This program is free software; you can redistribute it and/or modify
8*b725ae77Skettenis    it under the terms of the GNU General Public License as published by
9*b725ae77Skettenis    the Free Software Foundation; either version 2 of the License, or
10*b725ae77Skettenis    (at your option) any later version.
11*b725ae77Skettenis 
12*b725ae77Skettenis    This program is distributed in the hope that it will be useful,
13*b725ae77Skettenis    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*b725ae77Skettenis    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*b725ae77Skettenis    GNU General Public License for more details.
16*b725ae77Skettenis 
17*b725ae77Skettenis    You should have received a copy of the GNU General Public License
18*b725ae77Skettenis    along with this program; if not, write to the Free Software
19*b725ae77Skettenis    Foundation, Inc., 59 Temple Place - Suite 330,
20*b725ae77Skettenis    Boston, MA 02111-1307, USA.  */
21*b725ae77Skettenis 
22*b725ae77Skettenis #ifndef GDB_H
23*b725ae77Skettenis #define GDB_H
24*b725ae77Skettenis 
25*b725ae77Skettenis struct ui_out;
26*b725ae77Skettenis 
27*b725ae77Skettenis /* Return-code (RC) from a gdb library call.  (The abreviation RC is
28*b725ae77Skettenis    taken from the sim/common directory.) */
29*b725ae77Skettenis 
30*b725ae77Skettenis enum gdb_rc {
31*b725ae77Skettenis   /* The operation failed.  The failure message can be fetched by
32*b725ae77Skettenis      calling ``char *error_last_message(void)''. The value is
33*b725ae77Skettenis      determined by the catch_errors() interface. */
34*b725ae77Skettenis   /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
35*b725ae77Skettenis      internal / quit indication it is not possible to return that
36*b725ae77Skettenis      here. */
37*b725ae77Skettenis   GDB_RC_FAIL = 0,
38*b725ae77Skettenis   /* No error occured but nothing happened. Due to the catch_errors()
39*b725ae77Skettenis      interface, this must be non-zero. */
40*b725ae77Skettenis   GDB_RC_NONE = 1,
41*b725ae77Skettenis   /* The operation was successful. Due to the catch_errors()
42*b725ae77Skettenis      interface, this must be non-zero. */
43*b725ae77Skettenis   GDB_RC_OK = 2
44*b725ae77Skettenis };
45*b725ae77Skettenis 
46*b725ae77Skettenis 
47*b725ae77Skettenis /* Print the specified breakpoint on GDB_STDOUT. (Eventually this
48*b725ae77Skettenis    function will ``print'' the object on ``output''). */
49*b725ae77Skettenis enum gdb_rc gdb_breakpoint_query (struct ui_out *uiout, int bnum);
50*b725ae77Skettenis 
51*b725ae77Skettenis /* Create a breakpoint at ADDRESS (a GDB source and line). */
52*b725ae77Skettenis enum gdb_rc gdb_breakpoint (char *address, char *condition,
53*b725ae77Skettenis 			    int hardwareflag, int tempflag,
54*b725ae77Skettenis 			    int thread, int ignore_count);
55*b725ae77Skettenis 
56*b725ae77Skettenis /* Switch thread and print notification. */
57*b725ae77Skettenis enum gdb_rc gdb_thread_select (struct ui_out *uiout, char *tidstr);
58*b725ae77Skettenis 
59*b725ae77Skettenis /* Print a list of known thread ids. */
60*b725ae77Skettenis enum gdb_rc gdb_list_thread_ids (struct ui_out *uiout);
61*b725ae77Skettenis 
62*b725ae77Skettenis #endif
63