]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: pass struct smaps_data to linux_dump_mapping_p_ftype
authorAndrew Burgess <aburgess@redhat.com>
Wed, 7 May 2025 09:22:37 +0000 (10:22 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 12 May 2025 15:23:11 +0000 (16:23 +0100)
commit3c60c38bc9fa13062c5ce3f9870bcf3dba823f08
tree6d161ae2cbb1bee28599440293bb58b89b418835
parent6703aa6c7d60c9b24a475fdf52ea1ce1baf7ac19
gdb: pass struct smaps_data to linux_dump_mapping_p_ftype

Simplify the argument passing in linux_find_memory_regions_full when
calling the should_dump_mapping_p callback.  Instead of pulling all
the components from the smaps_data object and passing them separately,
just pass the smaps_data object.

I think this change is justified on its own; the code seems cleaner,
and easier to read to my eye.  But additionally, in a later commit in
this series I want to pass smaps_data::has_anonymous to the
should_dump_mapping_p callback, which would mean adding yet another
argument, and I think the argument list is already long enough.
Changing the function now to pass the smaps_data object means that I
will already have the ::has_anonymous field available in the later
commit.

There should be no user visible changes after this commit.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/linux-tdep.c