diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-05-04 08:14:22 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-05-05 15:27:26 -0400 |
commit | 6e9cd73eb553c372153d6e9ba4934119623fdad3 (patch) | |
tree | 1eb62a3689f410c6554d8d94bff6502d1a9a6849 /gdb/gdbarch-components.py | |
parent | 1653ae5b8440e2182ac86974b99b603bc15aa163 (diff) | |
download | binutils-6e9cd73eb553c372153d6e9ba4934119623fdad3.zip binutils-6e9cd73eb553c372153d6e9ba4934119623fdad3.tar.gz binutils-6e9cd73eb553c372153d6e9ba4934119623fdad3.tar.bz2 |
gdb: use gdb::function_view for gdbarch_iterate_over_objfiles_in_search_order callback
A rather straightforward patch to change an instance of callback +
void pointer to gdb::function_view, allowing pasing lambdas that
capture, and eliminating the need for the untyped pointer.
Change-Id: I73ed644e7849945265a2c763f79f5456695b0037
Diffstat (limited to 'gdb/gdbarch-components.py')
-rw-r--r-- | gdb/gdbarch-components.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gdb/gdbarch-components.py b/gdb/gdbarch-components.py index e8f20c8..fc10e86 100644 --- a/gdb/gdbarch-components.py +++ b/gdb/gdbarch-components.py @@ -2362,13 +2362,8 @@ Method( Iterate over all objfiles in the order that makes the most sense for the architecture to make global symbol searches. -CB is a callback function where OBJFILE is the objfile to be searched, -and CB_DATA a pointer to user-defined data (the same data that is passed -when calling this gdbarch method). The iteration stops if this function -returns nonzero. - -CB_DATA is a pointer to some user-defined data to be passed to -the callback. +CB is a callback function passed an objfile to be searched. The iteration stops +if this function returns nonzero. If not NULL, CURRENT_OBJFILE corresponds to the objfile being inspected when the symbol search was requested. @@ -2376,8 +2371,7 @@ inspected when the symbol search was requested. type="void", name="iterate_over_objfiles_in_search_order", params=[ - ("iterate_over_objfiles_in_search_order_cb_ftype *", "cb"), - ("void *", "cb_data"), + ("iterate_over_objfiles_in_search_order_cb_ftype", "cb"), ("struct objfile *", "current_objfile"), ], predefault="default_iterate_over_objfiles_in_search_order", |