aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:50:56 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:17 -0700
commite8a6c6ace9d2cc7fa94f8adb81aba5181f77442c (patch)
tree58f12fdbd76633fd8cffa0d5ac77329788583848 /gdb/target.c
parent7e35c012fb79ca35105f0d1b299014adef61be88 (diff)
downloadfsf-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.c17
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 (&current_target, address, length);
}
void