diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-18 14:50:56 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:17 -0700 |
commit | e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c (patch) | |
tree | 58f12fdbd76633fd8cffa0d5ac77329788583848 /gdb/target.c | |
parent | 7e35c012fb79ca35105f0d1b299014adef61be88 (diff) | |
download | fsf-binutils-gdb-e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c.zip fsf-binutils-gdb-e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c.tar.gz fsf-binutils-gdb-e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c.tar.bz2 |
convert to_flash_erase
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (target_flash_erase): Unconditionally delegate.
* target.h (struct target_ops) <to_flash_erase>: Use
TARGET_DEFAULT_NORETURN.
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gdb/target.c b/gdb/target.c index a639861..b208443 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1757,19 +1757,10 @@ target_memory_map (void) void target_flash_erase (ULONGEST address, LONGEST length) { - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_flash_erase != NULL) - { - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_flash_erase (%s, %s)\n", - hex_string (address), phex (length, 0)); - t->to_flash_erase (t, address, length); - return; - } - - tcomplain (); + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "target_flash_erase (%s, %s)\n", + hex_string (address), phex (length, 0)); + current_target.to_flash_erase (¤t_target, address, length); } void |