xtensa: Properly strdup string when building reggroup
authorStafford Horne <shorne@gmail.com>
Tue, 15 Aug 2017 21:12:45 +0000 (06:12 +0900)
committerStafford Horne <shorne@gmail.com>
Tue, 15 Aug 2017 21:12:45 +0000 (06:12 +0900)
commit9c3cc99930a08934e16b630e92a0d285a434f228
treef7394048b80181bd670e39c324421cf0f537344a
parent206726fbfdd521fbb184daedb71b85030453bf0b
xtensa: Properly strdup string when building reggroup

I noticed this while looking at the reggroup intializations.  It seems
for xtensa the "cpN" reggroup->name is getting assigned to the same text
pointer for each iteration of XTENSA_MAX_COPROCESSOR.

Note, internally reggroup_new() does not do any xstrdup().

gdb/ChangeLog:
2017-08-15  Stafford Horne  <shorne@gmail.com>

* xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
gdb/ChangeLog
gdb/xtensa-tdep.c