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-delegates.c | |
parent | 7e35c012fb79ca35105f0d1b299014adef61be88 (diff) | |
download | gdb-e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c.zip gdb-e8a6c6ace9d2cc7fa94f8adb81aba5181f77442c.tar.gz 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-delegates.c')
-rw-r--r-- | gdb/target-delegates.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 03e0030..c5fe013 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -723,6 +723,19 @@ tdefault_xfer_partial (struct target_ops *self, enum target_object arg1, const return TARGET_XFER_E_IO; } +static void +delegate_flash_erase (struct target_ops *self, ULONGEST arg1, LONGEST arg2) +{ + self = self->beneath; + self->to_flash_erase (self, arg1, arg2); +} + +static void +tdefault_flash_erase (struct target_ops *self, ULONGEST arg1, LONGEST arg2) +{ + tcomplain (); +} + static ptid_t delegate_get_ada_task_ptid (struct target_ops *self, long arg1, long arg2) { @@ -1350,6 +1363,8 @@ install_delegators (struct target_ops *ops) ops->to_goto_bookmark = delegate_goto_bookmark; if (ops->to_xfer_partial == NULL) ops->to_xfer_partial = delegate_xfer_partial; + if (ops->to_flash_erase == NULL) + ops->to_flash_erase = delegate_flash_erase; if (ops->to_get_ada_task_ptid == NULL) ops->to_get_ada_task_ptid = delegate_get_ada_task_ptid; if (ops->to_can_execute_reverse == NULL) @@ -1498,6 +1513,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_get_bookmark = tdefault_get_bookmark; ops->to_goto_bookmark = tdefault_goto_bookmark; ops->to_xfer_partial = tdefault_xfer_partial; + ops->to_flash_erase = tdefault_flash_erase; ops->to_get_ada_task_ptid = default_get_ada_task_ptid; ops->to_can_execute_reverse = tdefault_can_execute_reverse; ops->to_execution_direction = default_execution_direction; |