Update everything related to this.
+2001-07-26 Andrew Cagney <ac131313@redhat.com>
+
+ * thread.c, breakpoint.c: Include "gdb.h".
+ * Makefile.in (gdb_h): Define.
+ (HFILES_NO_SRCDIR): Add gdb.h.
+ (mi-cmd-break.o, mi-main.o, thread.o)
+ (breakpoint.o): Add dependency on $(gdb_h).
+
+ * defs.h (enum gdb_rc, gdb_breakpoint_query)
+ (gdb_breakpoint, gdb_thread_select)
+ (gdb_list_thread_ids): Move declaration from here ...
+ * gdb.h: To here. New file.
+
2001-07-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* Makefile.in (SUBDIR_TUI_OBS): Add tui-out.o, tui-hooks.o.
tm_h = @tm_h@
nm_h = @nm_h@
defs_h = defs.h $(xm_h) $(tm_h) $(nm_h) config.status config.h gdbarch.h ui-file.h
+gdb_h = gdb.h
top_h = top.h
inferior_h = inferior.h $(breakpoint_h)
# right, it is probably easiest just to list .h files here directly.
HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
- dst.h environ.h $(gdbcmd_h) gdbcore.h \
+ dst.h environ.h $(gdbcmd_h) gdb.h gdbcore.h \
gdb-stabs.h hpread.h $(inferior_h) language.h minimon.h monitor.h \
objfiles.h parser-defs.h partial-stab.h serial.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) language.h target.h gdbthread.h $(gdb_string_h) \
- gdb-events.h linespec.h $(ui_out_h) $(completer_h)
+ gdb-events.h linespec.h $(ui_out_h) $(completer_h) $(gdb_h)
buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
objfiles.h symfile.h $(symtab_h) $(gdb_string_h)
objfiles.h symfile.h target.h $(gdb_string_h) $(regcache_h)
thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h) target.h \
- $(regcache_h) $(ui_out_h)
+ $(regcache_h) $(ui_out_h) $(gdb_h)
completer.o: completer.c $(completer_h) $(gdbtypes_h) $(symtab_h) \
$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers)
$(ui_out_h) $(frame_h) $(value_h) $(target_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
- $(ui_out_h) $(mi_getopt_h)
+ $(ui_out_h) $(mi_getopt_h) $(gdb_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(mi_cmds_h) \
$(ui_out_h) $(value_h) $(target_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_console_h) $(mi_getopt_h) $(event_loop_h) $(event_top_h) \
- $(mi_getopt_h) $(regcache_h)
+ $(mi_getopt_h) $(regcache_h) $(gdb_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(mi_out_h) $(ui_out_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
#include "objfiles.h"
#include "linespec.h"
#include "completer.h"
+#include "gdb.h"
#ifdef UI_OUT
#include "ui-out.h"
#endif
#define ISATTY(FP) (isatty (fileno (FP)))
#endif
-\f
-/* FIXME: cagney/1999-12-13: The following will be moved to gdb.h /
- libgdb.h or gdblib.h. */
-
-/* Return-code (RC) from a gdb library call. (The abreviation RC is
- taken from the sim/common directory.) */
-
-enum gdb_rc {
- /* The operation failed. The failure message can be fetched by
- calling ``char *error_last_message(void)''. The value is
- determined by the catch_errors() interface. */
- /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
- internal / quit indication it is not possible to return that
- here. */
- GDB_RC_FAIL = 0,
- /* No error occured but nothing happened. Due to the catch_errors()
- interface, this must be non-zero. */
- GDB_RC_NONE = 1,
- /* The operation was successful. Due to the catch_errors()
- interface, this must be non-zero. */
- GDB_RC_OK = 2
-};
-
-
-/* Print the specified breakpoint on GDB_STDOUT. (Eventually this
- function will ``print'' the object on ``output''). */
-enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
-
-/* Create a breakpoint at ADDRESS (a GDB source and line). */
-enum gdb_rc gdb_breakpoint (char *address, char *condition,
- int hardwareflag, int tempflag,
- int thread, int ignore_count);
-enum gdb_rc gdb_thread_select (/* output object */ char *tidstr);
-
-#ifdef UI_OUT
-/* Print a list of known thread ids. */
-enum gdb_rc gdb_list_thread_ids (/* output object */);
-
-/* Switch thread and print notification. */
-#endif
-
#endif /* #ifndef DEFS_H */
--- /dev/null
+/* Library interface into GDB.
+ Copyright 1999, 2001
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef GDB_H
+#define GDB_H
+
+/* Return-code (RC) from a gdb library call. (The abreviation RC is
+ taken from the sim/common directory.) */
+
+enum gdb_rc {
+ /* The operation failed. The failure message can be fetched by
+ calling ``char *error_last_message(void)''. The value is
+ determined by the catch_errors() interface. */
+ /* NOTE: Since ``defs.h:catch_errors()'' does not return an error /
+ internal / quit indication it is not possible to return that
+ here. */
+ GDB_RC_FAIL = 0,
+ /* No error occured but nothing happened. Due to the catch_errors()
+ interface, this must be non-zero. */
+ GDB_RC_NONE = 1,
+ /* The operation was successful. Due to the catch_errors()
+ interface, this must be non-zero. */
+ GDB_RC_OK = 2
+};
+
+
+/* Print the specified breakpoint on GDB_STDOUT. (Eventually this
+ function will ``print'' the object on ``output''). */
+enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
+
+/* Create a breakpoint at ADDRESS (a GDB source and line). */
+enum gdb_rc gdb_breakpoint (char *address, char *condition,
+ int hardwareflag, int tempflag,
+ int thread, int ignore_count);
+
+/* Switch thread and print notification. */
+enum gdb_rc gdb_thread_select (/* output object */ char *tidstr);
+
+/* Print a list of known thread ids. */
+enum gdb_rc gdb_list_thread_ids (/* output object */);
+
+#endif
+2001-07-26 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c: Include "gdb.h".
+ * mi-cmd-break.c: Include "gdb.h".
+
2001-07-12 Andrew Cagney <ac131313@redhat.com>
* mi-main.c (mi_execute_command): Flush output after ``(gdb)''
#include "gdb_string.h"
#include "mi-getopt.h"
#include "gdb-events.h"
+#include "gdb.h"
/* Convenience macro for allocting typesafe memory. */
#include "gdbcore.h" /* for write_memory() */
#include "value.h" /* for write_register_bytes() */
#include "regcache.h"
+#include "gdb.h"
#include <ctype.h>
#include <sys/time.h>
#include "command.h"
#include "gdbcmd.h"
#include "regcache.h"
+#include "gdb.h"
#include <ctype.h>
#include <sys/types.h>