diff options
author | Pedro Alves <palves@redhat.com> | 2013-02-19 19:41:28 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-02-19 19:41:28 +0000 |
commit | 61a672f17d6544eb69a59aaed93c9eafdba74613 (patch) | |
tree | 4aefdffca1157d6b400298c9f53a6f6560d557af /gdb | |
parent | 40e397df34d493fc1e3455316af74d4d983dd80b (diff) | |
download | gdb-61a672f17d6544eb69a59aaed93c9eafdba74613.zip gdb-61a672f17d6544eb69a59aaed93c9eafdba74613.tar.gz gdb-61a672f17d6544eb69a59aaed93c9eafdba74613.tar.bz2 |
Garbage collect struct monitor_ops::load_routine.
While touching monitor_load in a previous patch, I noticed this method
is no longer set to anything other than NULL in the tree, so we can
remove it.
Tested by building with --enable-targets=all.
2013-02-19 Pedro Alves <palves@redhat.com>
Garbage collect 'struct monitor_ops'::load_routine.
* monitor.h (struct monitor_ops) <load_routine>: Remove field.
* monitor.c (monitor_load): No longer call
current_monitor->load_routine.
* dbug-rom.c (init_dbug_cmds): Don't set 'load_routine'.
* m32r-rom.c (init_m32r_cmds): Don't set 'load_routine'.
* ppcbug-rom.c (init_ppc_cmds): Don't set 'load_routine'.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/dbug-rom.c | 1 | ||||
-rw-r--r-- | gdb/m32r-rom.c | 2 | ||||
-rw-r--r-- | gdb/monitor.c | 69 | ||||
-rw-r--r-- | gdb/monitor.h | 2 | ||||
-rw-r--r-- | gdb/ppcbug-rom.c | 1 |
6 files changed, 43 insertions, 43 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2789036..ddb1824 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2013-02-19 Pedro Alves <palves@redhat.com> + Garbage collect 'struct monitor_ops'::load_routine. + + * monitor.h (struct monitor_ops) <load_routine>: Remove field. + * monitor.c (monitor_load): No longer call + current_monitor->load_routine. + * dbug-rom.c (init_dbug_cmds): Don't set 'load_routine'. + * m32r-rom.c (init_m32r_cmds): Don't set 'load_routine'. + * ppcbug-rom.c (init_ppc_cmds): Don't set 'load_routine'. + +2013-02-19 Pedro Alves <palves@redhat.com> + PR gdb/15161 Harmonize with generic_load. diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c index 37db603..135d06e 100644 --- a/gdb/dbug-rom.c +++ b/gdb/dbug-rom.c @@ -142,7 +142,6 @@ init_dbug_cmds (void) /* register_pattern */ dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)"; dbug_cmds.supply_register = dbug_supply_register; - dbug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ dbug_cmds.load = "dl\r"; /* download command */ dbug_cmds.loadresp = "\n"; /* load response */ dbug_cmds.prompt = "dBUG>"; /* monitor command prompt */ diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index 8c547ed..bf1af5c 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -348,7 +348,6 @@ init_m32r_cmds (void) /* register_pattern */ m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; m32r_cmds.supply_register = m32r_supply_register; - m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ m32r_cmds.load = NULL; /* download command */ m32r_cmds.loadresp = NULL; /* load response */ m32r_cmds.prompt = "ok "; /* monitor command prompt */ @@ -409,7 +408,6 @@ init_mon2000_cmds (void) /* register_pattern */ mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; mon2000_cmds.supply_register = m32r_supply_register; - mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ mon2000_cmds.load = NULL; /* download command */ mon2000_cmds.loadresp = NULL; /* load response */ mon2000_cmds.prompt = "Mon2000>"; /* monitor command prompt */ diff --git a/gdb/monitor.c b/gdb/monitor.c index f4ec12c..e6a9766 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -2178,55 +2178,50 @@ monitor_wait_srec_ack (void) static void monitor_load (char *args, int from_tty) { - monitor_debug ("MON load\n"); + CORE_ADDR load_offset = 0; + char **argv; + struct cleanup *old_cleanups; + char *filename; - if (current_monitor->load_routine) - current_monitor->load_routine (monitor_desc, args, hashmark); - else - { /* The default is ascii S-records. */ - CORE_ADDR load_offset = 0; - char **argv; - struct cleanup *old_cleanups; - char *filename; + monitor_debug ("MON load\n"); - if (args == NULL) - error_no_arg (_("file to load")); + if (args == NULL) + error_no_arg (_("file to load")); - argv = gdb_buildargv (args); - old_cleanups = make_cleanup_freeargv (argv); + argv = gdb_buildargv (args); + old_cleanups = make_cleanup_freeargv (argv); - filename = tilde_expand (argv[0]); - make_cleanup (xfree, filename); + filename = tilde_expand (argv[0]); + make_cleanup (xfree, filename); - /* Enable user to specify address for downloading as 2nd arg to load. */ - if (argv[1] != NULL) - { - const char *endptr; + /* Enable user to specify address for downloading as 2nd arg to load. */ + if (argv[1] != NULL) + { + const char *endptr; - load_offset = strtoulst (argv[1], &endptr, 0); + load_offset = strtoulst (argv[1], &endptr, 0); - /* If the last word was not a valid number then - treat it as a file name with spaces in. */ - if (argv[1] == endptr) - error (_("Invalid download offset:%s."), argv[1]); + /* If the last word was not a valid number then + treat it as a file name with spaces in. */ + if (argv[1] == endptr) + error (_("Invalid download offset:%s."), argv[1]); - if (argv[2] != NULL) - error (_("Too many parameters.")); - } + if (argv[2] != NULL) + error (_("Too many parameters.")); + } - monitor_printf (current_monitor->load); - if (current_monitor->loadresp) - monitor_expect (current_monitor->loadresp, NULL, 0); + monitor_printf (current_monitor->load); + if (current_monitor->loadresp) + monitor_expect (current_monitor->loadresp, NULL, 0); - load_srec (monitor_desc, filename, load_offset, - 32, SREC_ALL, hashmark, - current_monitor->flags & MO_SREC_ACK ? - monitor_wait_srec_ack : NULL); + load_srec (monitor_desc, filename, load_offset, + 32, SREC_ALL, hashmark, + current_monitor->flags & MO_SREC_ACK ? + monitor_wait_srec_ack : NULL); - monitor_expect_prompt (NULL, 0); + monitor_expect_prompt (NULL, 0); - do_cleanups (old_cleanups); - } + do_cleanups (old_cleanups); /* Finally, make the PC point at the start address. */ if (exec_bfd) diff --git a/gdb/monitor.h b/gdb/monitor.h index 1f30c70..e715729 100644 --- a/gdb/monitor.h +++ b/gdb/monitor.h @@ -102,8 +102,6 @@ struct monitor_ops from reg dump */ void (*supply_register) (struct regcache *regcache, char *name, int namelen, char *val, int vallen); - void (*load_routine) (struct serial *desc, char *file, - int hashmark); /* Download routine */ int (*dumpregs) (struct regcache *); /* Dump all registers */ int (*continue_hook) (void); /* Emit the continue command */ int (*wait_filter) (char *buf, /* Maybe contains registers */ diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c index dde34bb..859467e 100644 --- a/gdb/ppcbug-rom.c +++ b/gdb/ppcbug-rom.c @@ -168,7 +168,6 @@ init_ppc_cmds (char *LOAD_CMD, OPS->register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; OPS->supply_register = ppcbug_supply_register; OPS->dump_registers = "rd\r"; /* dump all registers */ - OPS->load_routine = NULL; /* load_routine (defaults to SRECs) */ OPS->load = LOAD_CMD; /* download command */ OPS->loadresp = NULL; /* load response */ OPS->prompt = "PPC1-Bug>"; /* monitor command prompt */ |