gdb: remove maint_print_section_data
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 2 Sep 2020 18:36:50 +0000 (14:36 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 2 Sep 2020 18:36:50 +0000 (14:36 -0400)
commitc5065df0439783d9ce7436bc855d18fd0c9e0b0b
treead7ebd5f6121a7aa22295b3364acb247fb7ea3bf
parent02c6f3f1fc2af7ad02bc649f0adfb479bf163441
gdb: remove maint_print_section_data

Since the "maintenance info sections" helper functions are not used
through a callback with a void* parameter anymore, the
maint_print_section_data is not needed anymore.  Remove it, replace it
with regular parameters.

Break out the index digits computation in its own function.

gdb/ChangeLog:

* maint.c (index_digits): New function.
(struct maint_print_section_data): Remove.
(print_bfd_section_info): Remove print_data parameter, add arg
and index_digits.
(print_objfile_section_info): Likewise.
(print_bfd_section_info_maybe_relocated): Likewise (plus
objfile).
(maintenance_info_sections): Adjust calls.

Change-Id: Idfeca5e7e0a95e72fade15cb1488058865c0258e
gdb/ChangeLog
gdb/maint.c