This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ob] Delete never referenced functions


More Wunused-function cleanup, committed,
Andrew
2004-01-18  Andrew Cagney  <cagney@redhat.com>

	* remote-sds.c (tohex): Delete unused function.
	* 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.

Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.128
diff -u -r1.128 infrun.c
--- infrun.c	17 Jan 2004 21:56:12 -0000	1.128
+++ infrun.c	18 Jan 2004 20:36:42 -0000
@@ -61,9 +61,6 @@
 
 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);
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.76
diff -u -r1.76 m68k-tdep.c
--- m68k-tdep.c	13 Jan 2004 21:38:46 -0000	1.76
+++ m68k-tdep.c	18 Jan 2004 20:36:57 -0000
@@ -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)
 {
@@ -143,20 +132,6 @@
 		    "m68k_register_name: illegal register number %d", 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
Index: remote-sds.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sds.c,v
retrieving revision 1.27
diff -u -r1.27 remote-sds.c
--- remote-sds.c	21 Sep 2003 01:26:45 -0000	1.27
+++ remote-sds.c	18 Jan 2004 20:37:06 -0000
@@ -92,8 +92,6 @@
 
 static void sds_kill (void);
 
-static int tohex (int);
-
 static int fromhex (int);
 
 static void sds_detach (char *, int);
@@ -276,17 +274,6 @@
     return a - 'a' + 10;
   else
     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
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.126
diff -u -r1.126 remote.c
--- remote.c	18 Jan 2004 03:38:32 -0000	1.126
+++ remote.c	18 Jan 2004 20:38:41 -0000
@@ -1162,10 +1162,6 @@
 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);
@@ -1575,19 +1571,6 @@
   result = remote_unpack_thread_info_response (threadinfo_pkt + 2, threadid,
 					       info);
   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   */
Index: source.c
===================================================================
RCS file: /cvs/src/src/gdb/source.c,v
retrieving revision 1.47
diff -u -r1.47 source.c
--- source.c	23 Nov 2003 20:41:17 -0000	1.47
+++ source.c	18 Jan 2004 20:38:48 -0000
@@ -1232,22 +1232,6 @@
   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
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.71
diff -u -r1.71 stabsread.c
--- stabsread.c	17 Jan 2004 01:05:06 -0000	1.71
+++ stabsread.c	18 Jan 2004 20:39:37 -0000
@@ -157,8 +157,6 @@
 
 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$";
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.68
diff -u -r1.68 target.c
--- target.c	5 Jan 2004 22:32:23 -0000	1.68
+++ target.c	18 Jan 2004 20:40:53 -0000
@@ -71,8 +71,6 @@
 
 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,
@@ -1601,24 +1599,6 @@
 
   sprintf (buf, "process %d", PIDGET (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 */
Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.28
diff -u -r1.28 ui-out.c
--- ui-out.c	28 Jun 2003 16:19:05 -0000	1.28
+++ ui-out.c	18 Jan 2004 20:40:53 -0000
@@ -269,8 +269,6 @@
 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 */
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.79
diff -u -r1.79 v850-tdep.c
--- v850-tdep.c	17 Jan 2004 18:45:25 -0000	1.79
+++ v850-tdep.c	18 Jan 2004 20:41:07 -0000
@@ -248,16 +248,6 @@
     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. */
 
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.69
diff -u -r1.69 xstormy16-tdep.c
--- xstormy16-tdep.c	17 Jan 2004 19:38:58 -0000	1.69
+++ xstormy16-tdep.c	18 Jan 2004 20:41:13 -0000
@@ -151,16 +151,6 @@
     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. */
 
Index: mi/mi-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v
retrieving revision 1.6
diff -u -r1.6 mi-interp.c
--- mi/mi-interp.c	8 Aug 2003 19:00:08 -0000	1.6
+++ mi/mi-interp.c	18 Jan 2004 20:41:23 -0000
@@ -57,8 +57,6 @@
    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);
@@ -297,25 +295,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
Index: mi/mi-out.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-out.c,v
retrieving revision 1.27
diff -u -r1.27 mi-out.c
--- mi/mi-out.c	28 Jun 2003 16:19:06 -0000	1.27
+++ mi/mi-out.c	18 Jan 2004 20:41:23 -0000
@@ -98,9 +98,6 @@
 		     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
@@ -289,31 +286,6 @@
 }
 
 /* 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 */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]