aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-07-11 08:02:03 -0600
committerTom Tromey <tromey@redhat.com>2014-07-18 09:48:01 -0600
commite75fdfcad1c868eae5396a95be9dd18010406306 (patch)
treef97ac1c4bf5bd0775578a8e38e06f549a556b839 /gdb/linux-thread-db.c
parent83814951ff9b8f73dcf7c860ad7b4f34a31f2be6 (diff)
downloadgdb-e75fdfcad1c868eae5396a95be9dd18010406306.zip
gdb-e75fdfcad1c868eae5396a95be9dd18010406306.tar.gz
gdb-e75fdfcad1c868eae5396a95be9dd18010406306.tar.bz2
clean up some target delegation cases
This patch cleans up some minor inconsistencies in target delegation. It's primary purpose is to avoid confusion in the code. A few spots were checking the "beneath" target; however this can only be NULL for the dummy target, so such tests are not needed. Some other spots were iterating over the beneath targets, looking for a method implementation. This is not needed for methods handled by make-target-delegates, as there is always an implementation. 2014-07-18 Tom Tromey <tromey@redhat.com> PR gdb/17130: * spu-multiarch.c (spu_region_ok_for_hw_watchpoint) (spu_fetch_registers, spu_store_registers, spu_xfer_partial) (spu_search_memory, spu_mourn_inferior): Simplify delegation. * linux-thread-db.c (thread_db_pid_to_str): Always delegate. * windows-nat.c (windows_xfer_partial): Always delegate. * record-btrace.c (record_btrace_xfer_partial): Simplify delegation. (record_btrace_fetch_registers, record_btrace_store_registers) (record_btrace_prepare_to_store, record_btrace_resume) (record_btrace_wait, record_btrace_find_new_threads) (record_btrace_thread_alive): Likewise. * procfs.c (procfs_xfer_partial): Always delegate. * corelow.c (core_xfer_partial): Always delegate. * sol-thread.c (sol_find_new_threads): Simplify delegation.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 15902d8..af8232a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1767,10 +1767,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
}
beneath = find_target_beneath (ops);
- if (beneath->to_pid_to_str (beneath, ptid))
- return beneath->to_pid_to_str (beneath, ptid);
-
- return normal_pid_to_str (ptid);
+ return beneath->to_pid_to_str (beneath, ptid);
}
/* Return a string describing the state of the thread specified by