gdb: remove target description macros
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 7 May 2021 20:28:56 +0000 (16:28 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 7 May 2021 20:28:56 +0000 (16:28 -0400)
commitc2962e6ab47869f13d4a72bac0b25a7e86a7fb94
tree9cb48ce4207dcdd35f5d73c709d68a17de4a59bb
parent0d315c88a77a811fdfad0b9fdaa4d8b337cc0a39
gdb: remove target description macros

In my opinion, the target_desc_fetched, current_target_desc and
target_description_filename macros in target-descriptions.c are not very
useful.  I don't think it's useful to hide that they operate on the
current inferior, as everything currently works under the assumption
that the various tdesc commands operate on the current inferior, and I
don't see that changing in the foreseeable future.

This change also avoids having multiple unnecessary calls to
current_inferior and get_tdesc_info per function.

gdb/ChangeLog:

* target-descriptions.c (struct target_desc_info) <tdesc>:
Adjust doc.
(target_desc_fetched): Remove.
(current_target_desc): Remove.
(target_description_filename): Remove.
(target_find_description): Adjust.
(target_clear_description): Adjust.
(target_current_description): Adjust.
(set_tdesc_filename_cmd): Adjust.
(show_tdesc_filename_cmd): Adjust.
(unset_tdesc_filename_cmd): Adjust.
(maint_print_c_tdesc_cmd): Adjust.
(maint_print_xml_tdesc_cmd): Adjust.

Change-Id: Ibfb581490e949c16d59924e2cac633ede5c26c5b
gdb/ChangeLog
gdb/target-descriptions.c