From e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2013 14:50:56 -0700 Subject: convert to_flash_erase 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (target_flash_erase): Unconditionally delegate. * target.h (struct target_ops) : Use TARGET_DEFAULT_NORETURN. --- gdb/target.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'gdb/target.c') 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 -- cgit v1.1