summaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2021-11-08 14:58:46 +0000
committerAndrew Burgess <aburgess@redhat.com>2021-11-16 17:45:45 +0000
commit8579fd136a614985bd27f20539c7bb7c5a51287d (patch)
treefb84850409a44e13e832cbadc9025d40c1d33d9f /gdb/xtensa-tdep.c
parent2bb7589ddf61e163f2e414e7033fad56ea17e784 (diff)
downloadbinutils-gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.tar.gz
gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr
The motivation is to reduce the number of places where unmanaged pointers are returned from allocation type routines. All of the callers are updated. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/xtensa-tdep.c')
-rw-r--r--gdb/xtensa-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index f09d2335559..239f1f786aa 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -727,7 +727,8 @@ xtensa_init_reggroups (void)
xtensa_vectra_reggroup = reggroup_new ("vectra", USER_REGGROUP);
for (i = 0; i < XTENSA_MAX_COPROCESSOR; i++)
- xtensa_cp[i] = reggroup_new (xstrprintf ("cp%d", i), USER_REGGROUP);
+ xtensa_cp[i] = reggroup_new (xstrprintf ("cp%d", i).release (),
+ USER_REGGROUP);
}
static void