2004-01-20 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Wed, 21 Jan 2004 15:37:11 +0000 (15:37 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 21 Jan 2004 15:37:11 +0000 (15:37 +0000)
* ax-gdb.c (print_axs_value): Delete unused function.
* jv-lang.c (java_lookup_type): Delete unused function.
* cli/cli-dump.c (dump_filetype): Delete unused function.
* remote-mips.c (remote_mips_insert_hw_breakpoint)
(remote_mips_remove_hw_breakpoint): Delete unused functions.
(mips_getstring): Delete unused function.
(pmon_insert_breakpoint): Delete #if0ed function.
(PMON_MAX_BP): Delete #if0ed MACRO.
(mips_pmon_bp_info): Delete #if0ed variable.
(pmon_remove_breakpoint): Delete #if0ed function.
* monitor.c (monitor_write_even_block): Delete unused function.
(monitor_write_memory_block): Delete #if0ed code.
* dink32-rom.c (dink32_load): Delete unused function.
(_initialize_dink32_rom): Delete #if0ed code.
* d10v-tdep.c (d10v_daddr_p): Delete unused function.

gdb/ChangeLog
gdb/ax-gdb.c
gdb/cli/cli-dump.c
gdb/d10v-tdep.c
gdb/dink32-rom.c
gdb/jv-lang.c
gdb/monitor.c
gdb/remote-mips.c

index b885f07f7c99c0a961b23ff50e6899576a9fce6d..6a93e91534fce7d5b11c628b59b1fd6baac2ac0e 100644 (file)
@@ -1,5 +1,21 @@
 2004-01-20  Andrew Cagney  <cagney@redhat.com>
 
+       * ax-gdb.c (print_axs_value): Delete unused function.
+       * jv-lang.c (java_lookup_type): Delete unused function.
+       * cli/cli-dump.c (dump_filetype): Delete unused function.
+       * remote-mips.c (remote_mips_insert_hw_breakpoint)
+       (remote_mips_remove_hw_breakpoint): Delete unused functions.
+       (mips_getstring): Delete unused function.
+       (pmon_insert_breakpoint): Delete #if0ed function.
+       (PMON_MAX_BP): Delete #if0ed MACRO.
+       (mips_pmon_bp_info): Delete #if0ed variable.
+       (pmon_remove_breakpoint): Delete #if0ed function.
+       * monitor.c (monitor_write_even_block): Delete unused function.
+       (monitor_write_memory_block): Delete #if0ed code.
+       * dink32-rom.c (dink32_load): Delete unused function.
+       (_initialize_dink32_rom): Delete #if0ed code.
+       * d10v-tdep.c (d10v_daddr_p): Delete unused function.
+
        * tui/tui-command.c: Update references.
        * tui/tui-io.c: Update references.
        * tui/tui-command.h: Update copyright.
index 5692c35f99015cbd012fffab490048b34e10858a..cacf308f5fdc472ecdea7a0aa2ac1ad88a1d0641 100644 (file)
@@ -134,7 +134,6 @@ static void gen_sizeof (union exp_element **pc,
 static void gen_expr (union exp_element **pc,
                      struct agent_expr *ax, struct axs_value *value);
 
-static void print_axs_value (struct ui_file *f, struct axs_value * value);
 static void agent_command (char *exp, int from_tty);
 \f
 
@@ -1797,33 +1796,6 @@ gen_trace_for_expr (CORE_ADDR scope, struct expression *expr)
   discard_cleanups (old_chain);
   return ax;
 }
-\f
-
-
-/* The "agent" command, for testing: compile and disassemble an expression.  */
-
-static void
-print_axs_value (struct ui_file *f, struct axs_value *value)
-{
-  switch (value->kind)
-    {
-    case axs_rvalue:
-      fputs_filtered ("rvalue", f);
-      break;
-
-    case axs_lvalue_memory:
-      fputs_filtered ("memory lvalue", f);
-      break;
-
-    case axs_lvalue_register:
-      fprintf_filtered (f, "register %d lvalue", value->u.reg);
-      break;
-    }
-
-  fputs_filtered (" : ", f);
-  type_print (value->type, "", f, -1);
-}
-
 
 static void
 agent_command (char *exp, int from_tty)
index 7b88975c6d47344dbfa8d6a160b1a77e7e4c4896..9e9c3de4b91a8d5904d8f8e6905026f82554dcbf 100644 (file)
@@ -330,36 +330,6 @@ dump_value_command (char *cmd, char *mode)
   dump_value_to_file (cmd, mode, "binary");
 }
 
-static void
-dump_filetype (char *cmd, char *mode, char *filetype)
-{
-  char *suffix = cmd;
-
-  if (cmd == NULL || *cmd == '\0')
-    error ("Missing subcommand: try 'help %s %s'.", 
-          mode[0] == 'a' ? "append" : "dump", 
-          filetype);
-
-  suffix += strcspn (cmd, " \t");
-
-  if (suffix != cmd)
-    {
-      if (strncmp ("memory", cmd, suffix - cmd) == 0)
-       {
-         dump_memory_to_file (suffix, mode, filetype);
-         return;
-       }
-      else if (strncmp ("value", cmd, suffix - cmd) == 0)
-       {
-         dump_value_to_file (suffix, mode, filetype);
-         return;
-       }
-    }
-
-  error ("dump %s: unknown subcommand '%s' -- try 'value' or 'memory'.",
-        filetype, cmd);
-}
-
 static void
 dump_srec_memory (char *args, int from_tty)
 {
index f0016aad75f3464f84ef5077e420b9b62b1898a7..b4eb2bb454da890cbb429b950f11ee64e399d699 100644 (file)
@@ -292,12 +292,6 @@ d10v_register_type (struct gdbarch *gdbarch, int reg_nr)
     return builtin_type_int16;
 }
 
-static int
-d10v_daddr_p (CORE_ADDR x)
-{
-  return (((x) & 0x3000000) == DMEM_START);
-}
-
 static int
 d10v_iaddr_p (CORE_ADDR x)
 {
index 3b10c7caa2e7fd5bc932c3f2bf28335fba29f5e1..4a6814093a050533ef6fe1c6619c02c909186482 100644 (file)
@@ -96,19 +96,6 @@ dink32_supply_register (char *regname, int regnamelen, char *val, int vallen)
   monitor_supply_register (regno, val);
 }
 
-static void
-dink32_load (struct monitor_ops *monops, char *filename, int from_tty)
-{
-  generic_load (filename, from_tty);
-
-  /* Finally, make the PC point at the start address */
-  if (exec_bfd)
-    write_pc (bfd_get_start_address (exec_bfd));
-
-  inferior_ptid = null_ptid;           /* No process now */
-}
-
-
 /* This array of registers needs to match the indexes used by GDB. The
    whole reason this exists is because the various ROM monitors use
    different names than GDB does, and don't support all the registers
@@ -172,9 +159,6 @@ _initialize_dink32_rom (void)
   /* S-record download, via "keyboard port".  */
   dink32_cmds.load = "dl -k\r";
   dink32_cmds.loadresp = "Set Input Port : set to Keyboard Port\r";
-#if 0                          /* slow load routine not needed if S-records work... */
-  dink32_cmds.load_routine = dink32_load;
-#endif
   dink32_cmds.prompt = "DINK32_603 >>";
   dink32_cmds.line_term = "\r";
   dink32_cmds.target = &dink32_ops;
index 0d4d6bb705d20ff0df9be347d915390f8ee69e04..d4779fdb7e04708de1545fe211aefec4e7a8714f 100644 (file)
@@ -58,7 +58,6 @@ static void java_demangled_signature_copy (char *, char *);
 static struct symtab *get_java_class_symtab (void);
 static char *get_java_utf8_name (struct obstack *obstack, struct value *name);
 static int java_class_is_primitive (struct value *clas);
-static struct type *java_lookup_type (char *signature);
 static struct value *java_value_string (char *ptr, int len);
 
 static void java_emit_char (int c, struct ui_file * stream, int quoter);
@@ -764,19 +763,6 @@ java_demangle_type_signature (char *signature)
   return result;
 }
 
-struct type *
-java_lookup_type (char *signature)
-{
-  switch (signature[0])
-    {
-    case 'L':
-    case '[':
-      error ("java_lookup_type not fully implemented");
-    default:
-      return java_primitive_type (signature[0]);
-    }
-}
-
 /* Return the type of TYPE followed by DIMS pairs of [ ].
    If DIMS == 0, TYPE is returned. */
 
index 198155f443f4f9826c2c7e2888f305836b2b12a6..cd4f045375ebbb44c54b1f59207d9bd265beaa09 100644 (file)
@@ -1515,33 +1515,6 @@ monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
 }
 
 
-static int
-monitor_write_even_block (CORE_ADDR memaddr, char *myaddr, int len)
-{
-  unsigned int val;
-  int written = 0;;
-  /* Enter the sub mode */
-  monitor_printf (current_monitor->setmem.cmdl, memaddr);
-  monitor_expect_prompt (NULL, 0);
-
-  while (len)
-    {
-      val = extract_unsigned_integer (myaddr, 4);      /* REALLY */
-      monitor_printf ("%x\r", val);
-      myaddr += 4;
-      memaddr += 4;
-      written += 4;
-      monitor_debug (" @ %s\n", paddr (memaddr));
-      /* If we wanted to, here we could validate the address */
-      monitor_expect_prompt (NULL, 0);
-    }
-  /* Now exit the sub mode */
-  monitor_printf (current_monitor->getreg.term_cmd);
-  monitor_expect_prompt (NULL, 0);
-  return written;
-}
-
-
 static int
 monitor_write_memory_bytes (CORE_ADDR memaddr, char *myaddr, int len)
 {
@@ -1693,17 +1666,6 @@ monitor_write_memory_block (CORE_ADDR memaddr, char *myaddr, int len)
     {
       return monitor_write_memory_longlongs (memaddr, myaddr, len);
     }
-#endif
-#if 0
-  if (len > 4)
-    {
-      int sublen;
-      written = monitor_write_even_block (memaddr, myaddr, len);
-      /* Adjust calling parameters by written amount */
-      memaddr += written;
-      myaddr += written;
-      len -= written;
-    }
 #endif
   written = monitor_write_memory_bytes (memaddr, myaddr, len);
   return written;
index 71e2befaeffdfc04905b1c834fbd3603d48c54c0..c75768406b946fc21c5a00b8f6a00e20e464c6f3 100644 (file)
@@ -599,35 +599,6 @@ mips_expect (const char *string)
   return mips_expect_timeout (string, remote_timeout);
 }
 
-/* Read the required number of characters into the given buffer (which
-   is assumed to be large enough). The only failure is a timeout. */
-static int
-mips_getstring (char *string, int n)
-{
-  char *p = string;
-  int c;
-
-  immediate_quit++;
-  while (n > 0)
-    {
-      c = serial_readchar (mips_desc, remote_timeout);
-
-      if (c == SERIAL_TIMEOUT)
-       {
-         fprintf_unfiltered (gdb_stderr,
-                "Failed to read %d characters from target (TIMEOUT)\n", n);
-         immediate_quit--;
-         return 0;
-       }
-
-      *p++ = c;
-      n--;
-    }
-
-  immediate_quit--;
-  return 1;
-}
-
 /* Read a character from the remote, aborting on error.  Returns
    SERIAL_TIMEOUT on timeout (since that's what serial_readchar()
    returns).  FIXME: If we see the string mips_monitor_prompt from the
@@ -2270,129 +2241,6 @@ mips_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
     return memory_remove_breakpoint (addr, contents_cache);
 }
 
-#if 0                          /* currently not used */
-/* PMON does not currently provide support for the debug mode 'b'
-   commands to manipulate breakpoints. However, if we wanted to use
-   the monitor breakpoints (rather than the GDB BREAK_INSN version)
-   then this code performs the work needed to leave debug mode,
-   set/clear the breakpoint, and then return to debug mode. */
-
-#define PMON_MAX_BP (33)       /* 32 SW, 1 HW */
-static CORE_ADDR mips_pmon_bp_info[PMON_MAX_BP];
-/* NOTE: The code relies on this vector being zero-initialised by the system */
-
-static int
-pmon_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
-  int status;
-
-  if (monitor_supports_breakpoints)
-    {
-      char tbuff[12];          /* space for breakpoint command */
-      int bpnum;
-      CORE_ADDR bpaddr;
-
-      /* PMON does not support debug level breakpoint set/remove: */
-      if (mips_exit_debug ())
-       mips_error ("Failed to exit debug mode");
-
-      sprintf (tbuff, "b %08x\r", addr);
-      mips_send_command (tbuff, 0);
-
-      mips_expect ("Bpt ");
-
-      if (!mips_getstring (tbuff, remote_timeout))
-       return 1;
-      tbuff[2] = '\0';         /* terminate the string */
-      if (sscanf (tbuff, "%d", &bpnum) != 1)
-       {
-         fprintf_unfiltered (gdb_stderr,
-             "Invalid decimal breakpoint number from target: %s\n", tbuff);
-         return 1;
-       }
-
-      mips_expect (" = ");
-
-      /* Lead in the hex number we are expecting: */
-      tbuff[0] = '0';
-      tbuff[1] = 'x';
-
-      /* FIXME!! only 8 bytes!  need to expand for Bfd64; 
-         which targets return 64-bit addresses?  PMON returns only 32! */
-      if (!mips_getstring (&tbuff[2], 8))
-       return 1;
-      tbuff[10] = '\0';                /* terminate the string */
-
-      if (sscanf (tbuff, "0x%08x", &bpaddr) != 1)
-       {
-         fprintf_unfiltered (gdb_stderr,
-                           "Invalid hex address from target: %s\n", tbuff);
-         return 1;
-       }
-
-      if (bpnum >= PMON_MAX_BP)
-       {
-         fprintf_unfiltered (gdb_stderr,
-                             "Error: Returned breakpoint number %d outside acceptable range (0..%d)\n",
-                             bpnum, PMON_MAX_BP - 1);
-         return 1;
-       }
-
-      if (bpaddr != addr)
-       fprintf_unfiltered (gdb_stderr, "Warning: Breakpoint addresses do not match: 0x%x != 0x%x\n", addr, bpaddr);
-
-      mips_pmon_bp_info[bpnum] = bpaddr;
-
-      mips_expect ("\r\n");
-      mips_expect (mips_monitor_prompt);
-
-      mips_enter_debug ();
-
-      return 0;
-    }
-
-  return mips_store_word (addr, BREAK_INSN, contents_cache);
-}
-
-static int
-pmon_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
-  if (monitor_supports_breakpoints)
-    {
-      int bpnum;
-      char tbuff[7];           /* enough for delete breakpoint command */
-
-      for (bpnum = 0; bpnum < PMON_MAX_BP; bpnum++)
-       if (mips_pmon_bp_info[bpnum] == addr)
-         break;
-
-      if (bpnum >= PMON_MAX_BP)
-       {
-         fprintf_unfiltered (gdb_stderr,
-                             "pmon_remove_breakpoint: Failed to find breakpoint at address 0x%s\n",
-                             paddr_nz (addr));
-         return 1;
-       }
-
-      if (mips_exit_debug ())
-       mips_error ("Failed to exit debug mode");
-
-      sprintf (tbuff, "db %02d\r", bpnum);
-
-      mips_send_command (tbuff, -1);
-      /* NOTE: If the breakpoint does not exist then a "Bpt <dd> not
-         set" message will be returned. */
-
-      mips_enter_debug ();
-
-      return 0;
-    }
-
-  return target_write_memory (addr, contents_cache, BREAK_INSN_SIZE);
-}
-#endif
-
-
 /* Tell whether this target can support a hardware breakpoint.  CNT
    is the number of hardware breakpoints already installed.  This
    implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro.  */
@@ -2427,31 +2275,6 @@ calculate_mask (CORE_ADDR addr, int len)
 }
 
 
-/* Insert a hardware breakpoint.  This works only on LSI targets, which
-   implement ordinary breakpoints using hardware facilities.  */
-
-static int
-remote_mips_insert_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
-  if (strcmp (target_shortname, "lsi") == 0)
-    return mips_insert_breakpoint (addr, contents_cache);
-  else
-    return -1;
-}
-
-
-/* Remove a hardware breakpoint.  This works only on LSI targets, which
-   implement ordinary breakpoints using hardware facilities.  */
-
-static int
-remote_mips_remove_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
-  if (strcmp (target_shortname, "lsi") == 0)
-    return mips_remove_breakpoint (addr, contents_cache);
-  else
-    return -1;
-}
-
 /* Set a data watchpoint.  ADDR and LEN should be obvious.  TYPE is 0
    for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write
    watchpoint. */
This page took 0.039607 seconds and 4 git commands to generate.