diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-01-21 15:37:11 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-01-21 15:37:11 +0000 |
commit | 5a1efed76c634acc0c568727c4bcda0e296c89dd (patch) | |
tree | f315a31e8530656a2de79c77c07211a9e522bb91 /gdb | |
parent | 28d39d1a3a0fa205e5223b183c3df93264865dc5 (diff) | |
download | gdb-5a1efed76c634acc0c568727c4bcda0e296c89dd.zip gdb-5a1efed76c634acc0c568727c4bcda0e296c89dd.tar.gz gdb-5a1efed76c634acc0c568727c4bcda0e296c89dd.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/ax-gdb.c | 28 | ||||
-rw-r--r-- | gdb/cli/cli-dump.c | 30 | ||||
-rw-r--r-- | gdb/d10v-tdep.c | 6 | ||||
-rw-r--r-- | gdb/dink32-rom.c | 16 | ||||
-rw-r--r-- | gdb/jv-lang.c | 14 | ||||
-rw-r--r-- | gdb/monitor.c | 38 | ||||
-rw-r--r-- | gdb/remote-mips.c | 177 |
8 files changed, 16 insertions, 309 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b885f07..6a93e91 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 5692c35..cacf308 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -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); @@ -1797,33 +1796,6 @@ gen_trace_for_expr (CORE_ADDR scope, struct expression *expr) discard_cleanups (old_chain); return ax; } - - - -/* 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) diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 7b88975..9e9c3de 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -331,36 +331,6 @@ dump_value_command (char *cmd, char *mode) } 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) { dump_memory_to_file (args, FOPEN_WB, "srec"); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index f0016aa..b4eb2bb 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -293,12 +293,6 @@ d10v_register_type (struct gdbarch *gdbarch, int reg_nr) } static int -d10v_daddr_p (CORE_ADDR x) -{ - return (((x) & 0x3000000) == DMEM_START); -} - -static int d10v_iaddr_p (CORE_ADDR x) { return (((x) & 0x3000000) == IMEM_START); diff --git a/gdb/dink32-rom.c b/gdb/dink32-rom.c index 3b10c7c..4a68140 100644 --- a/gdb/dink32-rom.c +++ b/gdb/dink32-rom.c @@ -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; diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index 0d4d6bb..d4779fd 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -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. */ diff --git a/gdb/monitor.c b/gdb/monitor.c index 198155f..cd4f045 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -1516,33 +1516,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) { unsigned char val; @@ -1694,17 +1667,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; } diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 71e2bef..c757684 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -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. */ |