diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-18 14:55:06 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:18 -0700 |
commit | 9e538d0d0bebe3230940a820c6ec1016f0795899 (patch) | |
tree | 89f3c763b28e06e36849a4d18915c87c17ef4f01 /gdb/target.c | |
parent | f6fb29258bb410c212c7bcbc48fb1f715bfd3839 (diff) | |
download | gdb-9e538d0d0bebe3230940a820c6ec1016f0795899.zip gdb-9e538d0d0bebe3230940a820c6ec1016f0795899.tar.gz gdb-9e538d0d0bebe3230940a820c6ec1016f0795899.tar.bz2 |
convert to_core_of_thread
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (target_core_of_thread): Unconditionally delegate.
* target.h (struct target_ops) <to_core_of_thread>: Use
TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/target.c b/gdb/target.c index d96f706..5f86c4e 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3711,23 +3711,13 @@ target_store_registers (struct regcache *regcache, int regno) int target_core_of_thread (ptid_t ptid) { - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - { - if (t->to_core_of_thread != NULL) - { - int retval = t->to_core_of_thread (t, ptid); - - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, - "target_core_of_thread (%d) = %d\n", - ptid_get_pid (ptid), retval); - return retval; - } - } + int retval = current_target.to_core_of_thread (¤t_target, ptid); - return -1; + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, + "target_core_of_thread (%d) = %d\n", + ptid_get_pid (ptid), retval); + return retval; } int |