From 6ea04265ddaef6bee392c6a4e047bd133cc0faa5 Mon Sep 17 00:00:00 2001 From: "J.T. Conklin" Date: Tue, 27 Mar 2001 20:36:24 +0000 Subject: [PATCH] * arch-utils.c (#include "gdbthread.h"): Removed. (#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. ------------------------------------------------------------------- --- gdb/ChangeLog | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ gdb/arch-utils.c | 9 --------- gdb/breakpoint.c | 14 +++----------- gdb/c-typeprint.c | 2 -- gdb/ch-exp.c | 9 ++------- gdb/ch-typeprint.c | 2 -- gdb/corefile.c | 6 ------ gdb/dbxread.c | 1 - gdb/environ.c | 1 - gdb/event-loop.c | 1 - gdb/f-typeprint.c | 5 ----- gdb/gdbtypes.h | 4 ---- gdb/infcmd.c | 1 - gdb/language.c | 1 - gdb/m2-typeprint.c | 3 --- gdb/m2-valprint.c | 1 - gdb/memattr.c | 2 +- gdb/p-typeprint.c | 2 -- gdb/p-valprint.c | 1 + gdb/parse.c | 1 - gdb/regcache.c | 1 - gdb/remote-nrom.c | 2 +- gdb/remote.c | 3 +-- gdb/source.c | 1 - gdb/stack.c | 2 -- gdb/symfile.c | 1 - gdb/tracepoint.c | 1 - gdb/values.c | 1 - gdb/varobj.c | 1 - gdb/wrapper.c | 1 - 30 files changed, 63 insertions(+), 71 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5c6d03eeeb..f23e5e35cb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,57 @@ +2001-03-19 J.T. Conklin + + * arch-utils.c (#include "gdbthread.h"): Removed. + (#include "symfile.h"): Removed. + (XMALLOC): Removed unused macro. + * breakpoint.c (tbreak_command): Removed local declaration. + (awatch_command, do_enable_breakpoint, set_breakpoint_count): + Remove duplicate declarations. + (bpstat_should_step, bpstat_have_active_hw_watchpoints) + (remove_solib_event_breakpoints): Fix indentation botch. + * c-typeprint.c (#include "command.h"): Removed. + (#include "gdbcmd.h"): Removed. + * ch-exp.c (ch_terminal_match_float_literal, parse_expr) + (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): + Removed duplicate declarations. + * ch-typeprint.c (#include "command.h"): Removed. + (#include "gdbcmd.h"): Removed. + * corefile.c (#include "frame.h"): Removed + (#include "symfile.h"): Removed. + (#include "language.h"): Removed. + * dbxread.c (#include "command.h"): Removed. + * environ.c (#include "gdbcore.h"): Removed. + * event-loop.c (#include "top.h"): Removed. + * f-typeprint.c (#include "command.h"): Removed. + (#include "gdbcmd.h"): Removed. + (#include "language.h"): Removed. + (#include "typeprint.h"): Removed. + (#include "frame.h"): Removed. + * gdbtypes.h (print_type_scalar): Removed declaration. + * infcmd.c (#include "completer.h"): Removed. + * language.c (#include "frame.h"): Removed. + * m2-typeprint.c (#include "command.h"): Removed. + (#include "gdbcmd.h"): Removed. + (#include "language.h"): Removed. + * m2-valprint.c (#include "valprint.h"): Removed. + * p-typeprint.c (#include "command.h"): Removed. + (#include "gdbcmd.h"): Removed. + * p-valprint.c (#include "typeprint.h"): Removed. + * parse.c (#include "linespec.h"): Removed. + * regcache.c (#include "frame.h"): Removed. + * remote.c (#include "frame.h"): Removed. + (getpkt_sane): Make static. + * source.c (#include "completer.h"): Removed. + * stack.c (#include "symfile.h"): Removed. + (#include "objfiles.h"): Removed. + * symfile.c (#include "completer.h"): Removed. + * tracepoint.c (#include "completer.h"): Removed. + * values.c (#include "frame.h"): Removed. + * varobj.c (#include "valprint.h"): Removed. + * wrapper.c (#include "frame.h"): Removed. + + * memattr.c (create_mem_region): Removed unused variable. + * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. + 2001-03-27 Nick Clifton * remote-rdp.c (rdp_set_command_line): Add missing double quote. diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index bfa548b5f9..004d3aeb10 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -35,22 +35,13 @@ #include "gdbcore.h" #include "gdbcmd.h" #include "target.h" -#include "gdbthread.h" #include "annotate.h" -#include "symfile.h" /* for overlay functions */ #endif #include "version.h" #include "floatformat.h" -/* Convenience macro for allocting typesafe memory. */ - -#ifndef XMALLOC -#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE)) -#endif - - /* Use the program counter to determine the contents and size of a breakpoint instruction. If no target-dependent macro BREAKPOINT_FROM_PC has been defined to implement this function, diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5eb1fa4d93..3121d9b2a8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -85,8 +85,6 @@ static int can_use_hardware_watchpoint (struct value *); static void break_at_finish_command (char *, int); static void break_at_finish_at_depth_command (char *, int); -void tbreak_command (char *, int); - static void tbreak_at_finish_command (char *, int); static void break_command_1 (char *, int, int); @@ -210,18 +208,12 @@ static void ep_skip_leading_whitespace (char **s); /* Prototypes for exported functions. */ -static void awatch_command (char *, int); - -static void do_enable_breakpoint (struct breakpoint *, enum bpdisp); - /* If FALSE, gdb will not use hardware support for watchpoints, even if such is available. */ static int can_use_hw_watchpoints; void _initialize_breakpoint (void); -void set_breakpoint_count (int); - extern int addressprint; /* Print machine addresses? */ static int internal_breakpoint_number = -1; @@ -2980,7 +2972,7 @@ bpstat_should_step (void) struct breakpoint *b; ALL_BREAKPOINTS (b) if (b->enable == enabled && b->type == bp_watchpoint) - return 1; + return 1; return 0; } @@ -2995,7 +2987,7 @@ bpstat_have_active_hw_watchpoints (void) ((b->type == bp_hardware_watchpoint) || (b->type == bp_read_watchpoint) || (b->type == bp_access_watchpoint))) - return 1; + return 1; return 0; } @@ -3950,7 +3942,7 @@ remove_solib_event_breakpoints (void) ALL_BREAKPOINTS_SAFE (b, temp) if (b->type == bp_shlib_event) - delete_breakpoint (b); + delete_breakpoint (b); } struct breakpoint * diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index bdc5a689ee..814c2d3310 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -29,8 +29,6 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" #include "language.h" #include "demangle.h" #include "c-lang.h" diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c index abd51878c2..c5d2fdaab3 100644 --- a/gdb/ch-exp.c +++ b/gdb/ch-exp.c @@ -148,13 +148,14 @@ static enum ch_terminal match_integer_literal (void); static enum ch_terminal match_character_literal (void); static enum ch_terminal match_string_literal (void); static enum ch_terminal match_float_literal (void); -static enum ch_terminal match_float_literal (void); static int decode_integer_literal (LONGEST *, char **); static int decode_integer_value (int, char **, LONGEST *); static char *match_simple_name_string (void); static void growbuf_by_size (int); +static void parse_case_label (void); static void parse_untyped_expr (void); static void parse_if_expression (void); +static void parse_if_expression_body (void); static void parse_else_alternative (void); static void parse_then_alternative (void); static void parse_expr (void); @@ -177,13 +178,7 @@ static struct type *parse_mode_call (void); #endif static void parse_unary_call (void); static int parse_opt_untyped_expr (void); -static void parse_case_label (void); static int expect (enum ch_terminal, char *); -static void parse_expr (void); -static void parse_primval (void); -static void parse_untyped_expr (void); -static int parse_opt_untyped_expr (void); -static void parse_if_expression_body (void); static enum ch_terminal ch_lex (void); INLINE static enum ch_terminal PEEK_TOKEN (void); static enum ch_terminal peek_token_ (int); diff --git a/gdb/ch-typeprint.c b/gdb/ch-typeprint.c index c217d2baa9..339dd0b32d 100644 --- a/gdb/ch-typeprint.c +++ b/gdb/ch-typeprint.c @@ -28,8 +28,6 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" #include "language.h" #include "ch-lang.h" #include "typeprint.h" diff --git a/gdb/corefile.c b/gdb/corefile.c index 0d6964bd37..716bb04735 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -25,21 +25,15 @@ #include #include #include -#include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "symtab.h" #include "command.h" #include "gdbcmd.h" -#include "symfile.h" #include "bfd.h" #include "target.h" #include "gdbcore.h" #include "dis-asm.h" -#include "language.h" #include "gdb_stat.h" -#include "symfile.h" -#include "objfiles.h" -#include "completer.h" /* Local function declarations. */ diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 0452e5b240..cdb165762e 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -46,7 +46,6 @@ #include "gdb_stat.h" #include "symtab.h" #include "breakpoint.h" -#include "command.h" #include "target.h" #include "gdbcore.h" /* for bfd stuff */ #include "libaout.h" /* FIXME Secret internal BFD stuff for a.out */ diff --git a/gdb/environ.c b/gdb/environ.c index 5b36b15999..1f9a9d67e9 100644 --- a/gdb/environ.c +++ b/gdb/environ.c @@ -23,7 +23,6 @@ #include "defs.h" #include "environ.h" #include "gdb_string.h" -#include "gdbcore.h" /* Return a new environment object. */ diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 285cea4744..de1f78f028 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "top.h" #include "event-loop.h" #include "event-top.h" diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 944b97d711..6e2f8b05f3 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -30,12 +30,7 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" -#include "language.h" #include "f-lang.h" -#include "typeprint.h" -#include "frame.h" /* ??? */ #include "gdb_string.h" #include diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index fd07000704..f5f9f1ad8f 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1125,8 +1125,4 @@ extern int is_integral_type (struct type *); extern void maintenance_print_type (char *, int); -/* typeprint.c */ - -extern void print_type_scalar (struct type *, LONGEST, struct ui_file *); - #endif /* GDBTYPES_H */ diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e6e951ffec..32a5954548 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -41,7 +41,6 @@ #endif #include "event-top.h" #include "parser-defs.h" -#include "completer.h" /* Functions exported for general use: */ diff --git a/gdb/language.c b/gdb/language.c index 6d70e81f4f..1a005b2f62 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -37,7 +37,6 @@ #include "gdbtypes.h" #include "value.h" #include "gdbcmd.h" -#include "frame.h" #include "expression.h" #include "language.h" #include "target.h" diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index d2988cf6c2..90aefae66e 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -27,9 +27,6 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" -#include "language.h" #include "m2-lang.h" #include diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index 4613d4b3b1..ec80301da8 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -22,7 +22,6 @@ #include "defs.h" #include "symtab.h" #include "gdbtypes.h" -#include "valprint.h" #include "m2-lang.h" /* FIXME: For now, just explicitly declare c_val_print and use it instead */ diff --git a/gdb/memattr.c b/gdb/memattr.c index ba64291292..b1b4a781b1 100644 --- a/gdb/memattr.c +++ b/gdb/memattr.c @@ -34,7 +34,7 @@ static struct mem_region * create_mem_region (CORE_ADDR lo, CORE_ADDR hi, const struct mem_attrib *attrib) { - struct mem_region *n, *p, *new; + struct mem_region *n, *new; if (lo > hi) { diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 2f7ac59778..0facebfa9d 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -29,8 +29,6 @@ #include "value.h" #include "gdbcore.h" #include "target.h" -#include "command.h" -#include "gdbcmd.h" #include "language.h" #include "p-lang.h" #include "typeprint.h" diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 46774c683e..275427b455 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -31,6 +31,7 @@ #include "gdbcore.h" #include "demangle.h" #include "valprint.h" +#include "typeprint.h" #include "language.h" #include "target.h" #include "annotate.h" diff --git a/gdb/parse.c b/gdb/parse.c index ff365ef768..2edc6d7666 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -42,7 +42,6 @@ #include "command.h" #include "language.h" #include "parser-defs.h" -#include "linespec.h" #include "gdbcmd.h" #include "symfile.h" /* for overlay functions */ #include "inferior.h" /* for NUM_PSEUDO_REGS. NOTE: replace diff --git a/gdb/regcache.c b/gdb/regcache.c index 5128c1e6fd..b58ed29e5d 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "frame.h" #include "inferior.h" #include "target.h" #include "gdbarch.h" diff --git a/gdb/remote-nrom.c b/gdb/remote-nrom.c index f2f0cecf5f..61e61aa99c 100644 --- a/gdb/remote-nrom.c +++ b/gdb/remote-nrom.c @@ -328,7 +328,7 @@ init_nrom_ops (void) nrom_ops.to_sections = NULL; nrom_ops.to_sections_end = NULL; nrom_ops.to_magic = OPS_MAGIC; -}; +} void _initialize_remote_nrom (void) diff --git a/gdb/remote.c b/gdb/remote.c index 9dbb8bd7aa..b2eb29a5ce 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -25,7 +25,6 @@ #include "gdb_string.h" #include #include -#include "frame.h" #include "inferior.h" #include "bfd.h" #include "symfile.h" @@ -3986,7 +3985,7 @@ getpkt (char *buf, executing user code to stop. If FOREVER == 0, this function is allowed to time out gracefully and return an indication of this to the caller. */ -int +static int getpkt_sane (char *buf, long sizeof_buf, int forever) diff --git a/gdb/source.c b/gdb/source.c index 389b89100c..d3ae4e4a9c 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -40,7 +40,6 @@ #include "annotate.h" #include "gdbtypes.h" #include "linespec.h" -#include "completer.h" #ifdef UI_OUT #include "ui-out.h" #endif diff --git a/gdb/stack.c b/gdb/stack.c index 615444354b..8dca5e0d18 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -35,8 +35,6 @@ #include "demangle.h" #include "inferior.h" #include "annotate.h" -#include "symfile.h" -#include "objfiles.h" #ifdef UI_OUT #include "ui-out.h" #endif diff --git a/gdb/symfile.c b/gdb/symfile.c index 8efc5d4571..1166eea14b 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -37,7 +37,6 @@ #include "inferior.h" /* for write_pc */ #include "gdb-stabs.h" #include "obstack.h" -#include "completer.h" #include #include diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index c5147deb25..888f54de87 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -32,7 +32,6 @@ #include "tracepoint.h" #include "remote.h" #include "linespec.h" -#include "completer.h" #include "regcache.h" #include "ax.h" diff --git a/gdb/values.c b/gdb/values.c index 3f73f15ca7..eec1178d1d 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -26,7 +26,6 @@ #include "gdbtypes.h" #include "value.h" #include "gdbcore.h" -#include "frame.h" #include "command.h" #include "gdbcmd.h" #include "target.h" diff --git a/gdb/varobj.c b/gdb/varobj.c index 97e2a4e356..40bc209de3 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -20,7 +20,6 @@ #include "value.h" #include "expression.h" #include "frame.h" -#include "valprint.h" #include "language.h" #include "wrapper.h" #include "gdbcmd.h" diff --git a/gdb/wrapper.c b/gdb/wrapper.c index 1936b2bc44..87e46fe511 100644 --- a/gdb/wrapper.c +++ b/gdb/wrapper.c @@ -18,7 +18,6 @@ #include "defs.h" #include "value.h" -#include "frame.h" #include "wrapper.h" /* Use this struct to pass arguments to wrapper routines. We assume -- 2.11.0