]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move libgdb library functions to gdb.h (new file).
authorAndrew Cagney <cagney@redhat.com>
Sat, 28 Jul 2001 19:48:15 +0000 (19:48 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 28 Jul 2001 19:48:15 +0000 (19:48 +0000)
Update everything related to this.

gdb/ChangeLog
gdb/Makefile.in
gdb/breakpoint.c
gdb/defs.h
gdb/gdb.h [new file with mode: 0644]
gdb/mi/ChangeLog
gdb/mi/mi-cmd-break.c
gdb/mi/mi-main.c
gdb/thread.c

index f0b6473bce41b646e6ab27c337c6b26fae095fca..1025a1c601ecfcbe1585c33d64071d1135dd64c4 100644 (file)
@@ -1,3 +1,16 @@
+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.
index 7c7e5841e8a1a00e67cf172776a88ff15ae8f598..80b8e9e1cb99459b9c3ca0e51f2f0c837bc32833 100644 (file)
@@ -597,6 +597,7 @@ xm_h =              @xm_h@
 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)
@@ -630,7 +631,7 @@ cp_abi_h = cp-abi.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 \
@@ -1226,7 +1227,7 @@ blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_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)
@@ -2044,7 +2045,7 @@ target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_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)
@@ -2200,14 +2201,14 @@ mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(top_h) $(mi_cmds_h) \
                $(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
index 77e96067df2d7c9bdb169677ac3ae49284f5cce2..db330ccfe925835f10c70685ac690068194bc125 100644 (file)
@@ -41,6 +41,7 @@
 #include "objfiles.h"
 #include "linespec.h"
 #include "completer.h"
+#include "gdb.h"
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
index b54a61663438ae748deff033596af46dc60ed1b8..d535b7c015c98a4ce4f1acae662443175f056038 100644 (file)
@@ -1437,45 +1437,4 @@ extern int use_windows;
 #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 */
diff --git a/gdb/gdb.h b/gdb/gdb.h
new file mode 100644 (file)
index 0000000..aa75612
--- /dev/null
+++ b/gdb/gdb.h
@@ -0,0 +1,60 @@
+/* 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
index 31e62190e85da21d781bfc8cb9dd2610589dff67..f28f340a51b270ca168aa7bf0aaf8dd5f4adbafa 100644 (file)
@@ -1,3 +1,8 @@
+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)''
index dc2eb3722f252139b9032478cd704537118a0e29..916acfa51b052027cbd0639c3a2904c074585196 100644 (file)
@@ -27,6 +27,7 @@
 #include "gdb_string.h"
 #include "mi-getopt.h"
 #include "gdb-events.h"
+#include "gdb.h"
 
 /* Convenience macro for allocting typesafe memory. */
 
index 1ce765f6d9f119315fdd17e114bc7b91cc01c2c4..464e5bc8f36a2f0e4c89d90b08c96d975433e591 100644 (file)
@@ -38,6 +38,7 @@
 #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>
 
index 210b9461bfcb6300cdf639611a01fc805c809d75..668fccafcb501794796da84b38c48e7be58e2714 100644 (file)
@@ -33,6 +33,7 @@
 #include "command.h"
 #include "gdbcmd.h"
 #include "regcache.h"
+#include "gdb.h"
 
 #include <ctype.h>
 #include <sys/types.h>