]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/infcall.c
gdb: remove current_top_target function
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 24 Mar 2021 22:08:12 +0000 (18:08 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 24 Mar 2021 22:08:24 +0000 (18:08 -0400)
commit328d42d87e97c75d6e52800bfd4bc1bfdfb745d2
tree4dee500fe0bf6acd7dcb8153aabebaa27936c564
parentd777bf0df22f1048fd24999ae563e30abcbcfbe7
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
48 files changed:
gdb/ChangeLog
gdb/auxv.c
gdb/avr-tdep.c
gdb/breakpoint.c
gdb/corefile.c
gdb/elfread.c
gdb/eval.c
gdb/exec.c
gdb/fbsd-tdep.c
gdb/frame.c
gdb/gnu-v3-abi.c
gdb/ia64-tdep.c
gdb/ia64-vms-tdep.c
gdb/infcall.c
gdb/infcmd.c
gdb/inferior.c
gdb/infrun.c
gdb/linespec.c
gdb/linux-tdep.c
gdb/maint.c
gdb/mi/mi-main.c
gdb/minsyms.c
gdb/ppc-linux-nat.c
gdb/procfs.c
gdb/regcache.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-linux-nat.c
gdb/s390-tdep.c
gdb/solib-aix.c
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-svr4.c
gdb/solib-target.c
gdb/sparc-tdep.c
gdb/sparc64-tdep.c
gdb/symfile.c
gdb/symtab.c
gdb/target-descriptions.c
gdb/target-memory.c
gdb/target.c
gdb/target.h
gdb/tracefile-tfile.c
gdb/tracepoint.c
gdb/valops.c
gdb/valprint.c
gdb/value.c
gdb/windows-tdep.c