From: Andrew Cagney Date: Mon, 19 Jan 2004 01:20:12 +0000 (+0000) Subject: 2004-01-18 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6f0559b48289f9b295ab3fac1bb5d78f88e5d91;p=binutils-gdb.git 2004-01-18 Andrew Cagney * remote-sds.c (tohex): Delete unused function. Update copyright. * xstormy16-tdep.c (xstormy16_register_virtual_size): Ditto. * v850-tdep.c (v850_register_virtual_size): Ditto. * target.c (normal_target_post_startup_inferior): Ditto. * source.c (ambiguous_line_spec): Ditto. * remote.c (adapt_remote_get_threadinfo): Ditto. * mi/mi-out.c (out_field_fmt): Ditto. * mi/mi-interp.c (mi_interp_read_one_line_hook): Ditto. (output_control_change_notification): Ditto. * m68k-tdep.c (m68k_register_byte): Ditto. (m68k_remote_breakpoint_from_pc): Ditto. * ui-out.c (init_ui_out_state): Delete unused declaration. * stabsread.c (search_value): Ditto. * mi/mi-cmd-env.c (env_cli_command): Ditto. * maint.c (print_section_table): Ditto. * infrun.c (set_follow_fork_mode_command): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7772813ed4c..81f7ac6813f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,22 @@ +2004-01-18 Andrew Cagney + + * remote-sds.c (tohex): Delete unused function. Update copyright. + * xstormy16-tdep.c (xstormy16_register_virtual_size): Ditto. + * v850-tdep.c (v850_register_virtual_size): Ditto. + * target.c (normal_target_post_startup_inferior): Ditto. + * source.c (ambiguous_line_spec): Ditto. + * remote.c (adapt_remote_get_threadinfo): Ditto. + * mi/mi-out.c (out_field_fmt): Ditto. + * mi/mi-interp.c (mi_interp_read_one_line_hook): Ditto. + (output_control_change_notification): Ditto. + * m68k-tdep.c (m68k_register_byte): Ditto. + (m68k_remote_breakpoint_from_pc): Ditto. + * ui-out.c (init_ui_out_state): Delete unused declaration. + * stabsread.c (search_value): Ditto. + * mi/mi-cmd-env.c (env_cli_command): Ditto. + * maint.c (print_section_table): Ditto. + * infrun.c (set_follow_fork_mode_command): Ditto. + 2004-01-18 Mark Kettenis * dwarf2-frame.c (execute_cfa_program): Move DWA_CFA_nop before diff --git a/gdb/infrun.c b/gdb/infrun.c index 11db68076fc..1ecbcc6a7a9 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2,8 +2,8 @@ process. Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software - Foundation, Inc. + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free + Software Foundation, Inc. This file is part of GDB. @@ -61,9 +61,6 @@ static int hook_stop_stub (void *); static void delete_breakpoint_current_contents (void *); -static void set_follow_fork_mode_command (char *arg, int from_tty, - struct cmd_list_element *c); - static int restore_selected_frame (void *); static void build_infrun (void); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index bb41ba5075d..7938426d985 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -1,7 +1,7 @@ /* Target dependent code for the Motorola 68000 series. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, - 2002, 2003 - Free Software Foundation, Inc. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, + 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -69,17 +69,6 @@ #endif -/* gdbarch_breakpoint_from_pc is set to m68k_local_breakpoint_from_pc - so m68k_remote_breakpoint_from_pc is currently not used. */ - -static const unsigned char * -m68k_remote_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) -{ - static unsigned char break_insn[] = {0x4e, (0x40 | REMOTE_BPT_VECTOR)}; - *lenptr = sizeof (break_insn); - return break_insn; -} - static const unsigned char * m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) { @@ -144,20 +133,6 @@ m68k_register_name (int regnum) else return register_names[regnum]; } - -/* Index within `registers' of the first byte of the space for - register regnum. */ - -static int -m68k_register_byte (int regnum) -{ - if (regnum >= M68K_FPC_REGNUM) - return (((regnum - M68K_FPC_REGNUM) * 4) + 168); - else if (regnum >= FP0_REGNUM) - return (((regnum - FP0_REGNUM) * 12) + 72); - else - return (regnum * 4); -} /* Extract from an array REGBUF containing the (raw) register state, a function return value of TYPE, and copy that, in virtual format, diff --git a/gdb/maint.c b/gdb/maint.c index f7bb1940cb2..f105afa601d 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -1,6 +1,8 @@ /* Support for GDB maintenance commands. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, + 2002, 2003, 2004 Free Software Foundation, Inc. + Written by Fred Fish at Cygnus Support. This file is part of GDB. @@ -54,8 +56,6 @@ static void maintenance_space_display (char *, int); static void maintenance_info_command (char *, int); -static void print_section_table (bfd *, asection *, void *); - static void maintenance_info_sections (char *, int); static void maintenance_print_command (char *, int); diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c index ec0fa350c84..439c71912bd 100644 --- a/gdb/mi/mi-cmd-env.c +++ b/gdb/mi/mi-cmd-env.c @@ -1,6 +1,6 @@ /* MI Command Set - environment commands. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Red Hat Inc. @@ -37,7 +37,6 @@ #include "gdb_string.h" #include "gdb_stat.h" -static void env_cli_command (const char *cli, const char *args); static void env_mod_path (char *dirname, char **which_path); extern void _initialize_mi_cmd_env (void); diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index b72d7ef0bc2..08201ca5bb2 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -1,6 +1,6 @@ /* MI Interpreter Definitions and Commands for GDB, the GNU debugger. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -57,8 +57,6 @@ static char *mi_input (char *); so we can report interesting things that happened "behind the mi's back" in this command */ static int mi_interp_query_hook (const char *ctlstr, va_list ap); -static char *mi_interp_read_one_line_hook (char *prompt, int repeat, - char *anno); static void mi3_command_loop (void); static void mi2_command_loop (void); @@ -299,25 +297,6 @@ mi_interp_query_hook (const char *ctlstr, va_list ap) return 1; } -static char * -mi_interp_read_one_line_hook (char *prompt, int repeat, char *anno) -{ - static char buff[256]; - printf_unfiltered ("=read-one-line,prompt=\"%s\"\n", prompt); - gdb_flush (gdb_stdout); - (void) fgets (buff, sizeof (buff), stdin); - buff[(strlen (buff) - 1)] = 0; - return buff; -} - -static void -output_control_change_notification (char *notification) -{ - printf_unfiltered ("^"); - printf_unfiltered ("%s\n", notification); - gdb_flush (gdb_stdout); -} - static void mi_execute_command_wrapper (char *cmd) { diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 637ceb42ca1..2be9d17b357 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -1,6 +1,6 @@ /* MI Command Set - output generating routines. - Copyright 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Cygnus Solutions (a Red Hat company). @@ -98,9 +98,6 @@ static void mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type); static void mi_close (struct ui_out *uiout, enum ui_out_type type); -static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname, - char *format,...); - /* Mark beginning of a table */ void @@ -290,31 +287,6 @@ mi_flush (struct ui_out *uiout) /* local functions */ -/* Like mi_field_fmt, but takes a variable number of args - and makes a va_list and does not insert a separator */ - -/* VARARGS */ -static void -out_field_fmt (struct ui_out *uiout, int fldno, char *fldname, - char *format,...) -{ - mi_out_data *data = ui_out_data (uiout); - va_list args; - - field_separator (uiout); - if (fldname) - fprintf_unfiltered (data->buffer, "%s=\"", fldname); - else - fputs_unfiltered ("\"", data->buffer); - - va_start (args, format); - vfprintf_unfiltered (data->buffer, format, args); - - fputs_unfiltered ("\"", data->buffer); - - va_end (args); -} - /* access to ui_out format private members */ static void diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c index c920997f0ba..d74fd7db242 100644 --- a/gdb/remote-sds.c +++ b/gdb/remote-sds.c @@ -1,6 +1,6 @@ /* Remote target communications for serial-line targets using SDS' protocol. - Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -92,8 +92,6 @@ static ptid_t sds_wait (ptid_t, struct target_waitstatus *); static void sds_kill (void); -static int tohex (int); - static int fromhex (int); static void sds_detach (char *, int); @@ -278,17 +276,6 @@ fromhex (int a) error ("Reply contains invalid hex digit %d", a); } -/* Convert number NIB to a hex digit. */ - -static int -tohex (int nib) -{ - if (nib < 10) - return '0' + nib; - else - return 'a' + nib - 10; -} - static int tob64 (unsigned char *inbuf, char *outbuf, int len) { diff --git a/gdb/remote.c b/gdb/remote.c index c18efd46ac9..617e55df9c4 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1162,10 +1162,6 @@ static int remote_unpack_thread_info_response (char *pkt, static int remote_get_threadinfo (threadref * threadid, int fieldset, /*TAG mask */ struct gdb_ext_thread_info *info); -static int adapt_remote_get_threadinfo (gdb_threadref * ref, - int selection, - struct gdb_ext_thread_info *info); - static char *pack_threadlist_request (char *pkt, int startflag, int threadcount, threadref * nextthread); @@ -1577,19 +1573,6 @@ remote_get_threadinfo (threadref *threadid, int fieldset, /* TAG mask */ return result; } -/* Unfortunately, 61 bit thread-ids are bigger than the internal - representation of a threadid. */ - -static int -adapt_remote_get_threadinfo (gdb_threadref *ref, int selection, - struct gdb_ext_thread_info *info) -{ - threadref lclref; - - int_to_threadref (&lclref, *ref); - return remote_get_threadinfo (&lclref, selection, info); -} - /* Format: i'Q':8,i"L":8,initflag:8,batchsize:16,lastthreadid:32 */ static char * diff --git a/gdb/source.c b/gdb/source.c index c5f588af69e..6c0e213a345 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1232,22 +1232,6 @@ print_source_lines (struct symtab *s, int line, int stopline, int noerror) print_source_lines_base (s, line, stopline, noerror); } -/* Print a list of files and line numbers which a user may choose from - in order to list a function which was specified ambiguously (as with - `list classname::overloadedfuncname', or 'list objectiveCSelector:). - The vector in SALS provides the filenames and line numbers. - NOTE: some of the SALS may have no filename or line information! */ - -static void -ambiguous_line_spec (struct symtabs_and_lines *sals) -{ - int i; - - for (i = 0; i < sals->nelts; ++i) - printf_filtered ("file: \"%s\", line number: %d\n", - sals->sals[i].symtab->filename, sals->sals[i].line); -} - /* Print info on range of pc's in a specified line. */ static void diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 0e615cb83e6..2a758031067 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -157,8 +157,6 @@ static char *find_name_end (char *name); static int process_reference (char **string); -static CORE_ADDR ref_search_value (int refnum); - void stabsread_clear_cache (void); static const char vptr_name[] = "_vptr$"; diff --git a/gdb/target.c b/gdb/target.c index cc3b747d4b8..18b5a77e1b9 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1,7 +1,7 @@ /* Select target systems and architectures at runtime for GDB. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -71,8 +71,6 @@ static struct target_ops *find_default_run_target (char *); static void nosupport_runtime (void); -static void normal_target_post_startup_inferior (ptid_t ptid); - static LONGEST default_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, void *readbuf, @@ -1603,24 +1601,6 @@ normal_pid_to_str (ptid_t ptid) return buf; } -/* Some targets (such as ttrace-based HPUX) don't allow us to request - notification of inferior events such as fork and vork immediately - after the inferior is created. (This because of how gdb gets an - inferior created via invoking a shell to do it. In such a scenario, - if the shell init file has commands in it, the shell will fork and - exec for each of those commands, and we will see each such fork - event. Very bad.) - - This function is used by all targets that allow us to request - notification of forks, etc at inferior creation time; e.g., in - target_acknowledge_forked_child. - */ -static void -normal_target_post_startup_inferior (ptid_t ptid) -{ - /* This space intentionally left blank. */ -} - /* Error-catcher for target_find_memory_regions */ static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) { diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 5fb8eaa69e8..854ec490ddf 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -1,6 +1,6 @@ /* Output generating routines for GDB. - Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by Fernando Nasser for Cygnus. @@ -269,8 +269,6 @@ static void clear_header_list (struct ui_out *uiout); static void verify_field (struct ui_out *uiout, int *fldno, int *width, int *align); -static void init_ui_out_state (struct ui_out *uiout); - /* exported functions (ui_out API) */ /* Mark beginning of a table */ diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 385c95c3244..321e97aa7fb 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -248,16 +248,6 @@ v850_register_raw_size (int regnum) return v850_reg_size; } -/* Function: v850_register_virtual_size - Returns the number of bytes occupied by the register as represented - internally by gdb. */ - -static int -v850_register_virtual_size (int regnum) -{ - return v850_register_raw_size (regnum); -} - /* Function: v850_reg_virtual_type Returns the default type for register N. */ diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 7b3e4303914..da875d3a702 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -151,16 +151,6 @@ xstormy16_register_raw_size (int regnum) return xstormy16_reg_size; } -/* Function: xstormy16_register_virtual_size - Returns the number of bytes occupied by the register as represented - internally by gdb. */ - -static int -xstormy16_register_virtual_size (int regnum) -{ - return xstormy16_register_raw_size (regnum); -} - /* Function: xstormy16_reg_virtual_type Returns the default type for register N. */