diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-11-05 04:47:26 +0000 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-11-17 20:01:37 +0000 |
commit | 9c742269ec8507d924d7a0c815155ca5aa21467a (patch) | |
tree | 311e5334f6a80b23a0b361e8f916a5df9a57ab0e /gdb/i386-tdep.c | |
parent | 7438771288f1acd5ab25277188a75ce9e48e256c (diff) | |
download | gdb-9c742269ec8507d924d7a0c815155ca5aa21467a.zip gdb-9c742269ec8507d924d7a0c815155ca5aa21467a.tar.gz gdb-9c742269ec8507d924d7a0c815155ca5aa21467a.tar.bz2 |
gdb: remove get_current_regcache
Remove get_current_regcache, inlining the call to get_thread_regcache in
callers. When possible, pass the right thread_info object known from
the local context. Otherwise, fall back to passing `inferior_thread ()`.
This makes the reference to global context bubble up one level, a small
step towards the long term goal of reducing the number of references to
global context (or rather, moving those references as close as possible
to the top of the call tree).
No behavior change expected.
Change-Id: Ifa6980c88825d803ea586546b6b4c633c33be8d6
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1ddca24..f5ff55d 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8907,11 +8907,10 @@ i386_target_description (uint64_t xcr0, bool segments) static unsigned long i386_mpx_bd_base (void) { - struct regcache *rcache; ULONGEST ret; enum register_status regstatus; - rcache = get_current_regcache (); + regcache *rcache = get_thread_regcache (inferior_thread ()); gdbarch *arch = rcache->arch (); i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch); |