/* Kernel Object Display generic routines and callbacks
- Copyright 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Fernando Nasser <fnasser@cygnus.com> for Cygnus Solutions.
#include "gdbcmd.h"
#include "target.h"
#include "gdb_string.h"
+#include "kod.h"
/* Prototypes for exported functions. */
void _initialize_kod (void);
/* Prototypes for local functions. */
-static void show_kod (char *, int);
static void info_kod_command (char *, int);
static void load_kod_library (char *);
gdb_kod_close - This is called when the KOD connection to the
remote should be terminated. */
-static char *(*gdb_kod_open) (void *, void *);
+static char *(*gdb_kod_open) (kod_display_callback_ftype *display,
+ kod_query_callback_ftype *query);
static void (*gdb_kod_request) (char *, int);
static void (*gdb_kod_close) ();
switching OS's. */
static char *old_operating_system;
-/* Functions imported from the library for all supported OSes.
- FIXME: we really should do something better, such as dynamically
- loading the KOD modules. */
-extern char *ecos_kod_open (void *, void *);
-extern void ecos_kod_request (char *, int);
-extern void ecos_kod_close ();
-extern char *cisco_kod_open (void *, void *);
-extern void cisco_kod_request (char *, int);
-extern void cisco_kod_close ();
-
-
/* Print a line of data generated by the module. */
static void
if (old_operating_system)
{
delete_cmd (old_operating_system, &infolist);
- free (old_operating_system);
+ xfree (old_operating_system);
}
- old_operating_system = strdup (operating_system);
+ old_operating_system = xstrdup (operating_system);
if (! operating_system || ! *operating_system)
{
p = "Unknown KOD library";
printf_filtered ("%s - %s\n", operating_system, p);
- free (kodlib);
+ xfree (kodlib);
}
}
}
void
-_initialize_kod ()
+_initialize_kod (void)
{
struct cmd_list_element *c;