]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Make tdesc_reg string fields std::string
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:30:25 +0000 (16:30 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:30:25 +0000 (16:30 -0500)
commita8142ee195063e8c7202429e80ee58185c34b3fc
tree152f5514bd82e7c60892c39ca214c7ec3c686e11
parentc9c895b9666e33a2b910faf9c1b667ea665f00f1
Make tdesc_reg string fields std::string

Make the name, group and type fields of tdesc_reg std::strings.  This
way, we don't have to manually free them in ~tdesc_reg.

Doing so results in a small change in the generated tdesc.  Instead of
passing an empty string for the group parameter of tdesc_create_reg, the
two modified tdesc now pass NULL.  The end result should be the same.

gdb/ChangeLog:

* target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
type of name_ parameter, adjust to std::string change.
<name, group, type>: Change type to std::string.
<~tdesc_reg>: Replace with default implementation.
<operator==>: Adjust.
(tdesc_find_register_early): Adjust.
(tdesc_register_name): Adjust.
(tdesc_register_type): Adjust.
(tdesc_register_in_reggroup_p): Adjust.
(class print_c_tdesc) <visit>: Adjust.
(class print_c_feature) <visit>: Adjust.
gdb/ChangeLog
gdb/features/arc-arcompact.c
gdb/features/arc-v2.c
gdb/target-descriptions.c