diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-03-24 18:08:12 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-03-24 18:08:24 -0400 |
commit | 328d42d87e97c75d6e52800bfd4bc1bfdfb745d2 (patch) | |
tree | 4dee500fe0bf6acd7dcb8153aabebaa27936c564 /gdb/s390-tdep.c | |
parent | d777bf0df22f1048fd24999ae563e30abcbcfbe7 (diff) | |
download | gdb-328d42d87e97c75d6e52800bfd4bc1bfdfb745d2.zip gdb-328d42d87e97c75d6e52800bfd4bc1bfdfb745d2.tar.gz gdb-328d42d87e97c75d6e52800bfd4bc1bfdfb745d2.tar.bz2 |
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
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r-- | gdb/s390-tdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 39c8ee0..1bd770a 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -39,6 +39,7 @@ #include "target-descriptions.h" #include "trad-frame.h" #include "value.h" +#include "inferior.h" #include "features/s390-linux32.c" #include "features/s390x-linux64.c" @@ -685,7 +686,7 @@ s390_load (struct s390_prologue_data *data, if (pv_is_constant (addr)) { const struct target_section *secp - = target_section_by_addr (current_top_target (), addr.k); + = target_section_by_addr (current_inferior ()->top_target (), addr.k); if (secp != NULL && (bfd_section_flags (secp->the_bfd_section) & SEC_READONLY)) return pv_constant (read_memory_integer (addr.k, size, |