]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make find_memory_region_ftype a function_view
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 14 Mar 2026 19:06:01 +0000 (15:06 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 19 Mar 2026 14:06:28 +0000 (10:06 -0400)
commit695fd5ec1221707c9edda3fabd1a980808a30fe1
treea730a7c3a10ba50c6b828eb2b1418b3d631d2e8a
parentebec91612c2a24c06dd03d7c5f02f6d86bfff3fc
gdb: make find_memory_region_ftype a function_view

Make it a function_view and remove the `void *` parameter.  Convert the
callers (in gcore.c) to use lambda functions that capture `obfd`.

The target_debug_print_find_memory_region_ftype debug printer isn't
terribly useful, but I don't see a good way to print a function_view
with what we have right now.

Since find_memory_region_ftype needs to be seen by both gdbarch.h and
target.h, I chose to move the typedef to a new file
(find-memory-region.h), that is included by both.

Change-Id: I9d24d31da31e5fe0439124cec1a9757ad226b222
Approved-By: Tom Tromey <tom@tromey.com>
21 files changed:
gdb/Makefile.in
gdb/defs.h
gdb/exec.c
gdb/fbsd-nat.c
gdb/fbsd-nat.h
gdb/find-memory-region.h [new file with mode: 0644]
gdb/gcore.c
gdb/gcore.h
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch.h
gdb/gdbarch_components.py
gdb/gnu-nat.c
gdb/linux-tdep.c
gdb/netbsd-nat.c
gdb/netbsd-nat.h
gdb/procfs.c
gdb/target-debug.h
gdb/target-delegates-gen.c
gdb/target.c
gdb/target.h