198944Sobrien/* Library interface into GDB.
298944Sobrien   Copyright 1999, 2001
398944Sobrien   Free Software Foundation, Inc.
498944Sobrien
598944Sobrien   This file is part of GDB.
698944Sobrien
798944Sobrien   This program is free software; you can redistribute it and/or modify
898944Sobrien   it under the terms of the GNU General Public License as published by
998944Sobrien   the Free Software Foundation; either version 2 of the License, or
1098944Sobrien   (at your option) any later version.
1198944Sobrien
1298944Sobrien   This program is distributed in the hope that it will be useful,
1398944Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
1498944Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1598944Sobrien   GNU General Public License for more details.
1698944Sobrien
1798944Sobrien   You should have received a copy of the GNU General Public License
1898944Sobrien   along with this program; if not, write to the Free Software
1998944Sobrien   Foundation, Inc., 59 Temple Place - Suite 330,
2098944Sobrien   Boston, MA 02111-1307, USA.  */
2198944Sobrien
2298944Sobrien#ifndef GDB_H
2398944Sobrien#define GDB_H
2498944Sobrien
25130803Smarcelstruct ui_out;
26130803Smarcel
2798944Sobrien/* Return-code (RC) from a gdb library call.  (The abreviation RC is
2898944Sobrien   taken from the sim/common directory.) */
2998944Sobrien
3098944Sobrienenum gdb_rc {
3198944Sobrien  /* The operation failed.  The failure message can be fetched by
3298944Sobrien     calling ``char *error_last_message(void)''. The value is
3398944Sobrien     determined by the catch_errors() interface. */
3498944Sobrien  /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
3598944Sobrien     internal / quit indication it is not possible to return that
3698944Sobrien     here. */
3798944Sobrien  GDB_RC_FAIL = 0,
3898944Sobrien  /* No error occured but nothing happened. Due to the catch_errors()
3998944Sobrien     interface, this must be non-zero. */
4098944Sobrien  GDB_RC_NONE = 1,
4198944Sobrien  /* The operation was successful. Due to the catch_errors()
4298944Sobrien     interface, this must be non-zero. */
4398944Sobrien  GDB_RC_OK = 2
4498944Sobrien};
4598944Sobrien
4698944Sobrien
4798944Sobrien/* Print the specified breakpoint on GDB_STDOUT. (Eventually this
4898944Sobrien   function will ``print'' the object on ``output''). */
4998944Sobrienenum gdb_rc gdb_breakpoint_query (struct ui_out *uiout, int bnum);
5098944Sobrien
5198944Sobrien/* Create a breakpoint at ADDRESS (a GDB source and line). */
5298944Sobrienenum gdb_rc gdb_breakpoint (char *address, char *condition,
5398944Sobrien			    int hardwareflag, int tempflag,
5498944Sobrien			    int thread, int ignore_count);
5598944Sobrien
5698944Sobrien/* Switch thread and print notification. */
5798944Sobrienenum gdb_rc gdb_thread_select (struct ui_out *uiout, char *tidstr);
5898944Sobrien
5998944Sobrien/* Print a list of known thread ids. */
6098944Sobrienenum gdb_rc gdb_list_thread_ids (struct ui_out *uiout);
6198944Sobrien
6298944Sobrien#endif
63