]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/frame.c
gdb: remove get_current_regcache
authorSimon Marchi <simon.marchi@efficios.com>
Sun, 5 Nov 2023 04:47:26 +0000 (04:47 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 17 Nov 2023 20:01:37 +0000 (20:01 +0000)
commit9c742269ec8507d924d7a0c815155ca5aa21467a
tree311e5334f6a80b23a0b361e8f916a5df9a57ab0e
parent7438771288f1acd5ab25277188a75ce9e48e256c
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
31 files changed:
gdb/arc-tdep.c
gdb/breakpoint.c
gdb/bsd-kvm.c
gdb/corelow.c
gdb/frame.c
gdb/frv-tdep.c
gdb/i386-fbsd-nat.c
gdb/i386-tdep.c
gdb/ia64-linux-nat.c
gdb/infcall.c
gdb/infcmd.c
gdb/infrun.c
gdb/linux-fork.c
gdb/m32c-tdep.c
gdb/mep-tdep.c
gdb/mi/mi-main.c
gdb/or1k-tdep.c
gdb/procfs.c
gdb/record-btrace.c
gdb/record-full.c
gdb/regcache-dump.c
gdb/regcache.c
gdb/regcache.h
gdb/reverse.c
gdb/solib-darwin.c
gdb/solib-svr4.c
gdb/stack.c
gdb/symfile.c
gdb/tracepoint.c
gdb/windows-nat.c
gdb/xtensa-tdep.c