From 328d42d87e97c75d6e52800bfd4bc1bfdfb745d2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 24 Mar 2021 18:08:12 -0400 Subject: gdb: remove current_top_target function The current_top_target function is a hidden dependency on the current inferior. Since I'd like to slowly move towards reducing our dependency on the global current state, remove this function and make callers use current_inferior ()->top_target () There is no expected change in behavior, but this one step towards making those callers use the inferior from their context, rather than refer to the global current inferior. gdb/ChangeLog: * target.h (current_top_target): Remove, make callers use the current inferior instead. * target.c (current_top_target): Remove. Change-Id: Iccd457036f84466cdaa3865aa3f9339a24ea001d --- gdb/windows-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/windows-tdep.c') diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index a06b448..97aa3da 100644 --- a/gdb/windows-tdep.c +++ b/gdb/windows-tdep.c @@ -487,7 +487,7 @@ display_one_tib (ptid_t ptid) return -1; } - if (target_read (current_top_target (), TARGET_OBJECT_MEMORY, + if (target_read (current_inferior ()->top_target (), TARGET_OBJECT_MEMORY, NULL, tib, thread_local_base, tib_size) != tib_size) { printf_filtered (_("Unable to read thread information " -- cgit v1.1