summaryrefslogtreecommitdiff
path: root/gdb/features
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-12-05 16:30:25 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-12-05 16:30:25 -0500
commita8142ee195063e8c7202429e80ee58185c34b3fc (patch)
tree152f5514bd82e7c60892c39ca214c7ec3c686e11 /gdb/features
parentc9c895b9666e33a2b910faf9c1b667ea665f00f1 (diff)
downloadbinutils-gdb-a8142ee195063e8c7202429e80ee58185c34b3fc.tar.gz
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.
Diffstat (limited to 'gdb/features')
-rw-r--r--gdb/features/arc-arcompact.c2
-rw-r--r--gdb/features/arc-v2.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/gdb/features/arc-arcompact.c b/gdb/features/arc-arcompact.c
index ea84a40d197..fd11e31447f 100644
--- a/gdb/features/arc-arcompact.c
+++ b/gdb/features/arc-arcompact.c
@@ -48,7 +48,7 @@ initialize_tdesc_arc_arcompact (void)
tdesc_create_reg (feature, "ilink2", 30, 1, NULL, 32, "code_ptr");
tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
- tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
+ tdesc_create_reg (feature, "pcl", 33, 1, NULL, 32, "code_ptr");
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
struct tdesc_type *field_type;
diff --git a/gdb/features/arc-v2.c b/gdb/features/arc-v2.c
index 1eefc246876..6eeefdb9849 100644
--- a/gdb/features/arc-v2.c
+++ b/gdb/features/arc-v2.c
@@ -45,10 +45,10 @@ initialize_tdesc_arc_v2 (void)
tdesc_create_reg (feature, "fp", 27, 1, NULL, 32, "data_ptr");
tdesc_create_reg (feature, "sp", 28, 1, NULL, 32, "data_ptr");
tdesc_create_reg (feature, "ilink", 29, 1, NULL, 32, "code_ptr");
- tdesc_create_reg (feature, "r30", 30, 1, "", 32, "int");
+ tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int");
tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
- tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
+ tdesc_create_reg (feature, "pcl", 33, 1, NULL, 32, "code_ptr");
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
struct tdesc_type *field_type;