/* Simple interpreter interface for GDB, the GNU debugger.
- Copyright (C) 1996 Free Software Foundation
+ Copyright (C) 1996, 2000 Free Software Foundation
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+As a special exception, the Free Software Foundation gives permission
+for additional uses of the text contained in its release of GUILE.
+
+The exception is that, if you link the GUILE library with other files
+to produce an executable, this does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+Your use of that executable is in no way restricted on account of
+linking the GUILE library code into it.
+
+This exception does not however invalidate any other reasons why
+the executable file might be covered by the GNU General Public License.
+
+This exception applies only to the code released by the
+Free Software Foundation under the name GUILE. If you copy
+code from other Free Software Foundation releases into a copy of
+GUILE, as the General Public License permits, the exception does
+not apply to the code that you add in this way. To avoid misleading
+anyone as to the status of such modified files, you must delete
+this exception notice from them.
+
+If you write modifications of your own for GUILE, it is your choice
+whether to permit this exception to apply to your modifications.
+If you do not wish that, delete this exception notice.
+
The author can be reached at djurfeldt@nada.kth.se
Mikael Djurfeldt, SANS/NADA KTH, 10044 STOCKHOLM, SWEDEN */
interface in your main program. This is necessary if the interface
is defined in a library, such as Guile. */
+#ifndef __MINGW32__
#define GDB_INTERFACE \
void *gdb_interface[] = { \
&gdb_options, \
(void *) gdb_print, \
(void *) gdb_binding \
}
+#else /* __MINGW32__ */
+/* Because the following functions are imported from a DLL (some kind of
+ shared library) these are NO static initializers. That is why you need to
+ define them and assign the functions and data items at run time. */
+#define GDB_INTERFACE \
+void *gdb_interface[] = \
+ { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+#define GDB_INTERFACE_INIT \
+ do { \
+ gdb_interface[0] = &gdb_options; \
+ gdb_interface[1] = &gdb_language; \
+ gdb_interface[2] = &gdb_result; \
+ gdb_interface[3] = &gdb_output; \
+ gdb_interface[4] = &gdb_output_length; \
+ gdb_interface[5] = (void *) gdb_maybe_valid_type_p; \
+ gdb_interface[6] = (void *) gdb_read; \
+ gdb_interface[7] = (void *) gdb_eval; \
+ gdb_interface[8] = (void *) gdb_print; \
+ gdb_interface[9] = (void *) gdb_binding; \
+ } while (0);
+#endif /* __MINGW32__ */
/* GDB_OPTIONS is a set of flags informing gdb what features are present
in the interface. Currently only one option is supported: */
In the "lisp/c" language mode, this is used to heuristically
discriminate lisp values from C values during printing. */
-extern int gdb_maybe_valid_type_p SCM_P ((GDB_TYPE value));
+extern int gdb_maybe_valid_type_p (GDB_TYPE value);
/* Parse expression in string STR. Store result in GDB_RESULT, then
return 0 to indicate success. On error, return -1 to indicate
no message is passed. Please note that the resulting value should
be protected against garbage collection. */
-extern int gdb_read SCM_P ((char *str));
+extern int gdb_read (char *str);
/* Evaluate expression EXP. Store result in GDB_RESULT, then return 0
to indicate success. On error, return -1 to indicate failure. Any
if no output is passed. Please note that the resulting lisp object
should be protected against garbage collection. */
-extern int gdb_eval SCM_P ((GDB_TYPE exp));
+extern int gdb_eval (GDB_TYPE exp);
/* Print VALUE. Store output in GDB_OUTPUT and GDB_OUTPUT_LENGTH.
Return 0 to indicate success. On error, return -1 to indicate
failure. Note that this function should be robust against strange
values. It could in fact be passed any kind of value. */
-extern int gdb_print SCM_P ((GDB_TYPE value));
+extern int gdb_print (GDB_TYPE value);
/* Bind NAME to VALUE in interpreter. (GDB has previously obtained
NAME by passing a string to gdb_read.) Return 0 to indicate
For scheme interpreters, this function should introduce top-level
bindings. */
-extern int gdb_binding SCM_P ((GDB_TYPE name, GDB_TYPE value));
+extern int gdb_binding (GDB_TYPE name, GDB_TYPE value);
#endif /* GDB_INTERFACE_H */
+
+/*
+ Local Variables:
+ c-file-style: "gnu"
+ End:
+*/