+1998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * command.c copying.c copying.awk core-aout.c core-regset.c
+ corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c
+ infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c
+ symmisc.c valarith.c: Add prototypes.
+
+ * defs.h: Add prototype for utils.c::do_run_cleanups.
+
+ * gdbtypes.c: Add prototypes.
+ (make_pointer_type): Add braces to remove nested if-else ambiguity.
+ (make_reference_type): Ditto.
+
+ * printcmd.c (printf_command): Initialize 'f' and 'string' at
+ function startup to suppress possibly-used-before-initialized warning.
+
+ * remote-utils.c: Add prototypes.
+ (sr_pollchar): Add braces to remove nested if-else ambiguity.
+
+ * ser-tcp.c: Add prototypes.
+ (wait_for): Add braces to remove nested if-else ambiguity.
+ (tcp_readchar): Ditto.
+
+ * ser-unix.c: Add prototypes.
+ (get_tty_state): Don't define errno here.
+ (hardwire_readchar): Only define 't' if we are compiling in a Cygwin
+ environment.
+
+ * symtab.c: Add prototypes.
+ (find_methods): Add braces to remove nested if-else ambiguity.
+ (search_symbols): Set 'i' to an initial value to suppress a
+ possibly-used-before-initialized warning.
+
+ * valops.c: Add prototypes.
+ (value_cast): Set 'eltype2' to an initial value to suppress a
+ possibly-used-before-initialized warning.
+ (value_of_variable): Add braces to remove nested if-else ambiguity.
+ (value_of_this): Ditto.
+
+ * valprint.c: Add prototypes.
+ (print_floating): Add braces to remove nested if-else ambiguity.
+
Thu Oct 15 19:50:48 1998 Stan Shebs <shebs@andros.cygnus.com>
* tm-sp64.h (SETUP_ARBITRARY_FRAME, RAME_SPECIFICATION_DYADIC):
/* Handle lists of commands, their decoding and documentation, for GDB.
- Copyright 1986, 1989, 1990, 1991 Free Software Foundation, Inc.
+ Copyright 1986, 1989, 1990, 1991, 1998 Free Software Foundation, Inc.
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
/* Prototypes for local functions */
-static void
-undef_cmd_error PARAMS ((char *, char *));
+static void undef_cmd_error PARAMS ((char *, char *));
-static void
-show_user PARAMS ((char *, int));
+static void show_user PARAMS ((char *, int));
-static void
-show_user_1 PARAMS ((struct cmd_list_element *, GDB_FILE *));
+static void show_user_1 PARAMS ((struct cmd_list_element *, GDB_FILE *));
-static void
-make_command PARAMS ((char *, int));
+static void make_command PARAMS ((char *, int));
-static void
-shell_escape PARAMS ((char *, int));
+static void shell_escape PARAMS ((char *, int));
-static int
-parse_binary_operation PARAMS ((char *));
+static int parse_binary_operation PARAMS ((char *));
-static void
-print_doc_line PARAMS ((GDB_FILE *, char *));
+static void print_doc_line PARAMS ((GDB_FILE *, char *));
+
+void _initialize_command PARAMS ((void));
/* Add element named NAME.
CLASS is the top level category into which commands are broken down
/* Extract registers from a "standard" core file, for GDB.
- Copyright (C) 1988-1995 Free Software Foundation, Inc.
+ Copyright (C) 1988-1998 Free Software Foundation, Inc.
This file is part of GDB.
static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
+void _initialize_core_aout PARAMS ((void));
+
/* Extract the register values out of the core file and store
them where `read_register' will find them.
/* Machine independent GDB support for core files on systems using "regsets".
- Copyright 1993-1996 Free Software Foundation, Inc.
+ Copyright 1993-1998 Free Software Foundation, Inc.
This file is part of GDB.
static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
+void _initialize_core_regset PARAMS ((void));
+
/*
GLOBAL FUNCTION
static int ignore PARAMS ((CORE_ADDR, char *));
+void _initialize_corelow PARAMS ((void));
+
/* Link a new core_fns into the global core_file_fns list. Called on gdb
startup by the _initialize routine in each core file register reader, to
register information about each format the the reader is prepared to
int coreops_suppress_target;
void
-_initialize_corelow()
+_initialize_corelow ()
{
if (!coreops_suppress_target)
add_target (&core_ops);
/* Caching code. Typically used by remote back ends for
caching remote memory.
- Copyright 1992, 1993, 1995 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
This file is part of GDB.
int cache_has_stuff;
} ;
-static int
-dcache_poke_byte PARAMS ((DCACHE *dcache, CORE_ADDR addr, char *ptr));
+static int dcache_poke_byte PARAMS ((DCACHE *dcache, CORE_ADDR addr,
+ char *ptr));
-static int
-dcache_peek_byte PARAMS ((DCACHE *dcache, CORE_ADDR addr, char *ptr));
+static int dcache_peek_byte PARAMS ((DCACHE *dcache, CORE_ADDR addr,
+ char *ptr));
-static struct dcache_block *
-dcache_hit PARAMS ((DCACHE *dcache, CORE_ADDR addr));
+static struct dcache_block *dcache_hit PARAMS ((DCACHE *dcache,
+ CORE_ADDR addr));
static int dcache_write_line PARAMS ((DCACHE *dcache,struct dcache_block *db));
static void dcache_info PARAMS ((char *exp, int tty));
+void _initialize_dcache PARAMS ((void));
+
int remote_dcache = 0;
DCACHE *last_cache; /* Used by info dcache */
-
/* Free all the data cache blocks, thus discarding all cached data. */
void
/* Support routines for manipulating internal types for GDB.
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
static void dump_fn_fieldlists PARAMS ((struct type *, int));
static void print_cplus_stuff PARAMS ((struct type *, int));
+void _initialize_gdbtypes PARAMS ((void));
+
/* Alloc a new type structure and fill it with some defaults. If
OBJFILE is non-NULL, then allocate the space for the type structure
in that objfile's type_obstack. */
ntype = TYPE_POINTER_TYPE (type);
if (ntype)
- if (typeptr == 0)
- return ntype; /* Don't care about alloc, and have new type. */
- else if (*typeptr == 0)
- {
- *typeptr = ntype; /* Tracking alloc, and we have new type. */
- return ntype;
- }
+ {
+ if (typeptr == 0)
+ return ntype; /* Don't care about alloc, and have new type. */
+ else if (*typeptr == 0)
+ {
+ *typeptr = ntype; /* Tracking alloc, and we have new type. */
+ return ntype;
+ }
+ }
if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */
{
ntype = TYPE_REFERENCE_TYPE (type);
if (ntype)
- if (typeptr == 0)
- return ntype; /* Don't care about alloc, and have new type. */
- else if (*typeptr == 0)
- {
- *typeptr = ntype; /* Tracking alloc, and we have new type. */
- return ntype;
- }
+ {
+ if (typeptr == 0)
+ return ntype; /* Don't care about alloc, and have new type. */
+ else if (*typeptr == 0)
+ {
+ *typeptr = ntype; /* Tracking alloc, and we have new type. */
+ return ntype;
+ }
+ }
if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */
{
/* Native-dependent code for SVR4 Unix running on i386's, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1996 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
This file is part of GDB.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "value.h"
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
+
#ifdef HAVE_SYS_PROCFS_H
#include <sys/procfs.h>
DS, ES, FS, GS,
};
+/* Prototypes for local functions */
+
+void fill_gregset PARAMS ((gregset_t *, int));
+
+void supply_gregset PARAMS ((gregset_t *));
+
+void supply_fpregset PARAMS ((fpregset_t *));
+
+void fill_fpregset PARAMS ((fpregset_t *, int));
+
/* FIXME: These routine absolutely depends upon (NUM_REGS - NUM_FREGS)
being less than or equal to the number of registers that can be stored
/* Intel 387 floating point stuff.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1989, 1991, 1998 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbcore.h"
#include "floatformat.h"
+void i387_to_double PARAMS ((char *, char *));
+
+void double_to_i387 PARAMS ((char *, char *));
+
/* FIXME: Eliminate these routines when we have the time to change all
the callers. */
/* Generic support for remote debugging interfaces.
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1998 Free Software Foundation, Inc.
This file is part of GDB.
#include "inferior.h" /* for generic_mourn_inferior */
#include "remote-utils.h"
+
+void _initialize_sr_support PARAMS ((void));
+
struct _sr_settings sr_settings = {
4, /* timeout:
remote-hms.c had 2
if (buf == SERIAL_TIMEOUT)
buf = 0;
if (sr_get_debug() > 0)
- if (buf)
- printf_unfiltered ("%c", buf);
- else
- printf_unfiltered ("<empty character poll>");
+ {
+ if (buf)
+ printf_unfiltered ("%c", buf);
+ else
+ printf_unfiltered ("<empty character poll>");
+ }
return buf & 0x7f;
}
/* Serial interface for raw TCP connections on Un*x like systems
- Copyright 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1998 Free Software Foundation, Inc.
This file is part of GDB.
serial_ttystate));
static void tcp_print_tty_state PARAMS ((serial_t, serial_ttystate));
+void _initialize_ser_tcp PARAMS ((void));
+
/* Open up a raw tcp socket */
static int
*/
static int
-wait_for(scb, timeout)
+wait_for (scb, timeout)
serial_t scb;
int timeout;
{
numfds = select(scb->fd+1, &readfds, 0, &exceptfds, 0);
if (numfds <= 0)
- if (numfds == 0)
- return SERIAL_TIMEOUT;
- else if (errno == EINTR)
- continue;
- else
- return SERIAL_ERROR; /* Got an error from select or poll */
+ {
+ if (numfds == 0)
+ return SERIAL_TIMEOUT;
+ else if (errno == EINTR)
+ continue;
+ else
+ return SERIAL_ERROR; /* Got an error from select or poll */
+ }
return 0;
}
dead, or -3 for any other error (see errno in that case). */
static int
-tcp_readchar(scb, timeout)
+tcp_readchar (scb, timeout)
serial_t scb;
int timeout;
{
}
if (scb->bufcnt <= 0)
- if (scb->bufcnt == 0)
- return SERIAL_TIMEOUT; /* 0 chars means timeout [may need to
- distinguish between EOF & timeouts
- someday] */
- else
- return SERIAL_ERROR; /* Got an error from read */
+ {
+ if (scb->bufcnt == 0)
+ return SERIAL_TIMEOUT; /* 0 chars means timeout [may need to
+ distinguish between EOF & timeouts
+ someday] */
+ else
+ return SERIAL_ERROR; /* Got an error from read */
+ }
scb->bufcnt--;
scb->bufp = scb->buf;
static int hardwire_send_break PARAMS ((serial_t));
static int hardwire_setstopbits PARAMS ((serial_t, int));
+void _initialize_ser_hardwire PARAMS ((void));
+
#ifdef __CYGWIN32__
extern void (*ui_loop_hook) PARAMS ((int));
#endif
}
static int
-get_tty_state(scb, state)
+get_tty_state (scb, state)
serial_t scb;
struct hardwire_ttystate *state;
{
#ifdef HAVE_TERMIOS
- extern int errno;
-
if (tcgetattr(scb->fd, &state->termios) < 0)
return -1;
char if successful. Returns SERIAL_TIMEOUT if timeout expired, EOF if line
dropped dead, or SERIAL_ERROR for any other error (see errno in that case). */
static int
-hardwire_readchar(scb, timeout)
+hardwire_readchar (scb, timeout)
serial_t scb;
int timeout;
{
- int status, t;
+ int status;
+#ifdef __CYGWIN32__
+ int t;
+#endif
if (scb->bufcnt-- > 0)
return *scb->bufp++;