aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-07-20 14:18:04 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-10-08 10:14:14 +0100
commit51a948fdf0e14fb69ab9e0c79ae8b2415801f9a3 (patch)
treecee1830c4dbd38e527e9498837c72e161957c132 /gdb
parentf9ff65d4dffbaf342dce7a8760059c27683cd962 (diff)
downloadgdb-51a948fdf0e14fb69ab9e0c79ae8b2415801f9a3.zip
gdb-51a948fdf0e14fb69ab9e0c79ae8b2415801f9a3.tar.gz
gdb-51a948fdf0e14fb69ab9e0c79ae8b2415801f9a3.tar.bz2
gdb: Have allocate_target_description return a unique_ptr
Update allocate_target_description to return a target_desc_up, a specialisation of unique_ptr. This commit does not attempt to make use of the unique_ptr in the best possible way, in almost all cases we immediately release the pointer from within the unique_ptr and then continue as before. There are a few places where it was easy to handle the unique_ptr, and in these cases I've done that. Everything under gdb/features/* is auto-regenerated. There should be no user visible changes after this commit. gdb/ChangeLog: * arch/aarch32.c (aarch32_create_target_description): Release unique_ptr returned from allocate_target_description. * arch/aarch64.c (aarch64_create_target_description): Likewise. * arch/amd64.c (amd64_create_target_description): Likewise. * arch/arc.c (arc_create_target_description): Likewise. * arch/arm.c (arm_create_target_description): Likewise. * arch/i386.c (i386_create_target_description): Likewise. * arch/riscv.c (riscv_create_target_description): Update return type. Handle allocate_target_description returning a unique_ptr. (riscv_lookup_target_description): Update to handle unique_ptr. * arch/tic6x.c (tic6x_create_target_description): Release unique_ptr returned from allocate_target_description. * features/microblaze-with-stack-protect.c: Regenerate. * features/microblaze.c: Regenerate. * features/mips-dsp-linux.c: Regenerate. * features/mips-linux.c: Regenerate. * features/mips64-dsp-linux.c: Regenerate. * features/mips64-linux.c: Regenerate. * features/nds32.c: Regenerate. * features/nios2.c: Regenerate. * features/or1k.c: Regenerate. * features/rs6000/powerpc-32.c: Regenerate. * features/rs6000/powerpc-32l.c: Regenerate. * features/rs6000/powerpc-403.c: Regenerate. * features/rs6000/powerpc-403gc.c: Regenerate. * features/rs6000/powerpc-405.c: Regenerate. * features/rs6000/powerpc-505.c: Regenerate. * features/rs6000/powerpc-601.c: Regenerate. * features/rs6000/powerpc-602.c: Regenerate. * features/rs6000/powerpc-603.c: Regenerate. * features/rs6000/powerpc-604.c: Regenerate. * features/rs6000/powerpc-64.c: Regenerate. * features/rs6000/powerpc-64l.c: Regenerate. * features/rs6000/powerpc-7400.c: Regenerate. * features/rs6000/powerpc-750.c: Regenerate. * features/rs6000/powerpc-860.c: Regenerate. * features/rs6000/powerpc-altivec32.c: Regenerate. * features/rs6000/powerpc-altivec32l.c: Regenerate. * features/rs6000/powerpc-altivec64.c: Regenerate. * features/rs6000/powerpc-altivec64l.c: Regenerate. * features/rs6000/powerpc-e500.c: Regenerate. * features/rs6000/powerpc-e500l.c: Regenerate. * features/rs6000/powerpc-isa205-32l.c: Regenerate. * features/rs6000/powerpc-isa205-64l.c: Regenerate. * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate. * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate. * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Regenerate. * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Regenerate. * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate. * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate. * features/rs6000/powerpc-isa207-htm-vsx32l.c: Regenerate. * features/rs6000/powerpc-isa207-htm-vsx64l.c: Regenerate. * features/rs6000/powerpc-isa207-vsx32l.c: Regenerate. * features/rs6000/powerpc-isa207-vsx64l.c: Regenerate. * features/rs6000/powerpc-vsx32.c: Regenerate. * features/rs6000/powerpc-vsx32l.c: Regenerate. * features/rs6000/powerpc-vsx64.c: Regenerate. * features/rs6000/powerpc-vsx64l.c: Regenerate. * features/rs6000/rs6000.c: Regenerate. * features/rx.c: Regenerate. * features/s390-gs-linux64.c: Regenerate. * features/s390-linux32.c: Regenerate. * features/s390-linux32v1.c: Regenerate. * features/s390-linux32v2.c: Regenerate. * features/s390-linux64.c: Regenerate. * features/s390-linux64v1.c: Regenerate. * features/s390-linux64v2.c: Regenerate. * features/s390-te-linux64.c: Regenerate. * features/s390-tevx-linux64.c: Regenerate. * features/s390-vx-linux64.c: Regenerate. * features/s390x-gs-linux64.c: Regenerate. * features/s390x-linux64.c: Regenerate. * features/s390x-linux64v1.c: Regenerate. * features/s390x-linux64v2.c: Regenerate. * features/s390x-te-linux64.c: Regenerate. * features/s390x-tevx-linux64.c: Regenerate. * features/s390x-vx-linux64.c: Regenerate. * mips-tdep.c (_initialize_mips_tdep): Release unique_ptr returned from allocate_target_description. * target-descriptions.c (allocate_target_description): Update return type. (print_c_tdesc::visit_pre): Release unique_ptr returned from allocate_target_description. gdbserver/ChangeLog: * linux-low.cc (linux_process_target::handle_extended_wait): Release the unique_ptr returned from allocate_target_description. * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise. * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type. (tdesc_i386_linux_no_xml): Change type. (x86_linux_read_description): Borrow pointer from unique_ptr object. (x86_target::get_ipa_tdesc_idx): Likewise. (initialize_low_arch): Likewise. * tdesc.cc (allocate_target_description): Update return type. gdbsupport/ChangeLog: * tdesc.h (allocate_target_description): Update return type.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog86
-rw-r--r--gdb/arch/aarch32.c2
-rw-r--r--gdb/arch/aarch64.c2
-rw-r--r--gdb/arch/amd64.c2
-rw-r--r--gdb/arch/arc.c2
-rw-r--r--gdb/arch/arm.c4
-rw-r--r--gdb/arch/i386.c2
-rw-r--r--gdb/arch/riscv.c27
-rw-r--r--gdb/arch/tic6x.c2
-rw-r--r--gdb/features/microblaze-with-stack-protect.c8
-rw-r--r--gdb/features/microblaze.c6
-rw-r--r--gdb/features/mips-dsp-linux.c18
-rw-r--r--gdb/features/mips-linux.c16
-rw-r--r--gdb/features/mips64-dsp-linux.c16
-rw-r--r--gdb/features/mips64-linux.c14
-rw-r--r--gdb/features/nds32.c12
-rw-r--r--gdb/features/nios2.c8
-rw-r--r--gdb/features/or1k.c8
-rw-r--r--gdb/features/rs6000/powerpc-32.c10
-rw-r--r--gdb/features/rs6000/powerpc-32l.c12
-rw-r--r--gdb/features/rs6000/powerpc-403.c12
-rw-r--r--gdb/features/rs6000/powerpc-403gc.c12
-rw-r--r--gdb/features/rs6000/powerpc-405.c10
-rw-r--r--gdb/features/rs6000/powerpc-505.c12
-rw-r--r--gdb/features/rs6000/powerpc-601.c12
-rw-r--r--gdb/features/rs6000/powerpc-602.c12
-rw-r--r--gdb/features/rs6000/powerpc-603.c12
-rw-r--r--gdb/features/rs6000/powerpc-604.c12
-rw-r--r--gdb/features/rs6000/powerpc-64.c10
-rw-r--r--gdb/features/rs6000/powerpc-64l.c12
-rw-r--r--gdb/features/rs6000/powerpc-7400.c12
-rw-r--r--gdb/features/rs6000/powerpc-750.c12
-rw-r--r--gdb/features/rs6000/powerpc-860.c12
-rw-r--r--gdb/features/rs6000/powerpc-altivec32.c12
-rw-r--r--gdb/features/rs6000/powerpc-altivec32l.c14
-rw-r--r--gdb/features/rs6000/powerpc-altivec64.c12
-rw-r--r--gdb/features/rs6000/powerpc-altivec64l.c14
-rw-r--r--gdb/features/rs6000/powerpc-e500.c10
-rw-r--r--gdb/features/rs6000/powerpc-e500l.c12
-rw-r--r--gdb/features/rs6000/powerpc-isa205-32l.c12
-rw-r--r--gdb/features/rs6000/powerpc-isa205-64l.c12
-rw-r--r--gdb/features/rs6000/powerpc-isa205-altivec32l.c14
-rw-r--r--gdb/features/rs6000/powerpc-isa205-altivec64l.c14
-rw-r--r--gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c20
-rw-r--r--gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c20
-rw-r--r--gdb/features/rs6000/powerpc-isa205-vsx32l.c16
-rw-r--r--gdb/features/rs6000/powerpc-isa205-vsx64l.c16
-rw-r--r--gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c42
-rw-r--r--gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c42
-rw-r--r--gdb/features/rs6000/powerpc-isa207-vsx32l.c26
-rw-r--r--gdb/features/rs6000/powerpc-isa207-vsx64l.c26
-rw-r--r--gdb/features/rs6000/powerpc-vsx32.c14
-rw-r--r--gdb/features/rs6000/powerpc-vsx32l.c16
-rw-r--r--gdb/features/rs6000/powerpc-vsx64.c14
-rw-r--r--gdb/features/rs6000/powerpc-vsx64l.c16
-rw-r--r--gdb/features/rs6000/rs6000.c10
-rw-r--r--gdb/features/rx.c6
-rw-r--r--gdb/features/s390-gs-linux64.c22
-rw-r--r--gdb/features/s390-linux32.c14
-rw-r--r--gdb/features/s390-linux32v1.c14
-rw-r--r--gdb/features/s390-linux32v2.c14
-rw-r--r--gdb/features/s390-linux64.c14
-rw-r--r--gdb/features/s390-linux64v1.c14
-rw-r--r--gdb/features/s390-linux64v2.c14
-rw-r--r--gdb/features/s390-te-linux64.c16
-rw-r--r--gdb/features/s390-tevx-linux64.c18
-rw-r--r--gdb/features/s390-vx-linux64.c16
-rw-r--r--gdb/features/s390x-gs-linux64.c22
-rw-r--r--gdb/features/s390x-linux64.c14
-rw-r--r--gdb/features/s390x-linux64v1.c14
-rw-r--r--gdb/features/s390x-linux64v2.c14
-rw-r--r--gdb/features/s390x-te-linux64.c16
-rw-r--r--gdb/features/s390x-tevx-linux64.c18
-rw-r--r--gdb/features/s390x-vx-linux64.c16
-rw-r--r--gdb/mips-tdep.c4
-rw-r--r--gdb/target-descriptions.c18
76 files changed, 599 insertions, 512 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3c9d07e..f3d27ea 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,89 @@
+2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * arch/aarch32.c (aarch32_create_target_description): Release
+ unique_ptr returned from allocate_target_description.
+ * arch/aarch64.c (aarch64_create_target_description): Likewise.
+ * arch/amd64.c (amd64_create_target_description): Likewise.
+ * arch/arc.c (arc_create_target_description): Likewise.
+ * arch/arm.c (arm_create_target_description): Likewise.
+ * arch/i386.c (i386_create_target_description): Likewise.
+ * arch/riscv.c (riscv_create_target_description): Update return
+ type. Handle allocate_target_description returning a unique_ptr.
+ (riscv_lookup_target_description): Update to handle unique_ptr.
+ * arch/tic6x.c (tic6x_create_target_description): Release
+ unique_ptr returned from allocate_target_description.
+ * features/microblaze-with-stack-protect.c: Regenerate.
+ * features/microblaze.c: Regenerate.
+ * features/mips-dsp-linux.c: Regenerate.
+ * features/mips-linux.c: Regenerate.
+ * features/mips64-dsp-linux.c: Regenerate.
+ * features/mips64-linux.c: Regenerate.
+ * features/nds32.c: Regenerate.
+ * features/nios2.c: Regenerate.
+ * features/or1k.c: Regenerate.
+ * features/rs6000/powerpc-32.c: Regenerate.
+ * features/rs6000/powerpc-32l.c: Regenerate.
+ * features/rs6000/powerpc-403.c: Regenerate.
+ * features/rs6000/powerpc-403gc.c: Regenerate.
+ * features/rs6000/powerpc-405.c: Regenerate.
+ * features/rs6000/powerpc-505.c: Regenerate.
+ * features/rs6000/powerpc-601.c: Regenerate.
+ * features/rs6000/powerpc-602.c: Regenerate.
+ * features/rs6000/powerpc-603.c: Regenerate.
+ * features/rs6000/powerpc-604.c: Regenerate.
+ * features/rs6000/powerpc-64.c: Regenerate.
+ * features/rs6000/powerpc-64l.c: Regenerate.
+ * features/rs6000/powerpc-7400.c: Regenerate.
+ * features/rs6000/powerpc-750.c: Regenerate.
+ * features/rs6000/powerpc-860.c: Regenerate.
+ * features/rs6000/powerpc-altivec32.c: Regenerate.
+ * features/rs6000/powerpc-altivec32l.c: Regenerate.
+ * features/rs6000/powerpc-altivec64.c: Regenerate.
+ * features/rs6000/powerpc-altivec64l.c: Regenerate.
+ * features/rs6000/powerpc-e500.c: Regenerate.
+ * features/rs6000/powerpc-e500l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-32l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-64l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
+ * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
+ * features/rs6000/powerpc-isa207-htm-vsx32l.c: Regenerate.
+ * features/rs6000/powerpc-isa207-htm-vsx64l.c: Regenerate.
+ * features/rs6000/powerpc-isa207-vsx32l.c: Regenerate.
+ * features/rs6000/powerpc-isa207-vsx64l.c: Regenerate.
+ * features/rs6000/powerpc-vsx32.c: Regenerate.
+ * features/rs6000/powerpc-vsx32l.c: Regenerate.
+ * features/rs6000/powerpc-vsx64.c: Regenerate.
+ * features/rs6000/powerpc-vsx64l.c: Regenerate.
+ * features/rs6000/rs6000.c: Regenerate.
+ * features/rx.c: Regenerate.
+ * features/s390-gs-linux64.c: Regenerate.
+ * features/s390-linux32.c: Regenerate.
+ * features/s390-linux32v1.c: Regenerate.
+ * features/s390-linux32v2.c: Regenerate.
+ * features/s390-linux64.c: Regenerate.
+ * features/s390-linux64v1.c: Regenerate.
+ * features/s390-linux64v2.c: Regenerate.
+ * features/s390-te-linux64.c: Regenerate.
+ * features/s390-tevx-linux64.c: Regenerate.
+ * features/s390-vx-linux64.c: Regenerate.
+ * features/s390x-gs-linux64.c: Regenerate.
+ * features/s390x-linux64.c: Regenerate.
+ * features/s390x-linux64v1.c: Regenerate.
+ * features/s390x-linux64v2.c: Regenerate.
+ * features/s390x-te-linux64.c: Regenerate.
+ * features/s390x-tevx-linux64.c: Regenerate.
+ * features/s390x-vx-linux64.c: Regenerate.
+ * mips-tdep.c (_initialize_mips_tdep): Release unique_ptr returned
+ from allocate_target_description.
+ * target-descriptions.c (allocate_target_description): Update
+ return type.
+ (print_c_tdesc::visit_pre): Release unique_ptr returned from
+ allocate_target_description.
+
2020-10-07 Tom Tromey <tromey@adacore.com>
* unittests/search-memory-selftests.c: New file.
diff --git a/gdb/arch/aarch32.c b/gdb/arch/aarch32.c
index 5bc24a3..bf7a332 100644
--- a/gdb/arch/aarch32.c
+++ b/gdb/arch/aarch32.c
@@ -26,7 +26,7 @@
target_desc *
aarch32_create_target_description ()
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc, "arm");
diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c
index f611543..c0af7b0 100644
--- a/gdb/arch/aarch64.c
+++ b/gdb/arch/aarch64.c
@@ -29,7 +29,7 @@
target_desc *
aarch64_create_target_description (uint64_t vq, bool pauth_p)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc, "aarch64");
diff --git a/gdb/arch/amd64.c b/gdb/arch/amd64.c
index a388c7e..b11a4fd 100644
--- a/gdb/arch/amd64.c
+++ b/gdb/arch/amd64.c
@@ -40,7 +40,7 @@ target_desc *
amd64_create_target_description (uint64_t xcr0, bool is_x32, bool is_linux,
bool segments)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc, is_x32 ? "i386:x64-32" : "i386:x86-64");
diff --git a/gdb/arch/arc.c b/gdb/arch/arc.c
index 3808f9f..dff4575 100644
--- a/gdb/arch/arc.c
+++ b/gdb/arch/arc.c
@@ -38,7 +38,7 @@ STATIC_IN_GDB target_desc *
arc_create_target_description (const struct arc_arch_features &features)
{
/* Create a new target description. */
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
std::string arch_name;
diff --git a/gdb/arch/arm.c b/gdb/arch/arm.c
index faa2b4f..dc67e40 100644
--- a/gdb/arch/arm.c
+++ b/gdb/arch/arm.c
@@ -374,7 +374,7 @@ shifted_reg_val (struct regcache *regcache, unsigned long inst,
target_desc *
arm_create_target_description (arm_fp_type fp_type)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
if (fp_type == ARM_FP_TYPE_IWMMXT)
@@ -416,7 +416,7 @@ arm_create_target_description (arm_fp_type fp_type)
target_desc *
arm_create_mprofile_target_description (arm_m_profile_type m_type)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc, "arm");
diff --git a/gdb/arch/i386.c b/gdb/arch/i386.c
index 099a20b..13201db 100644
--- a/gdb/arch/i386.c
+++ b/gdb/arch/i386.c
@@ -35,7 +35,7 @@
target_desc *
i386_create_target_description (uint64_t xcr0, bool is_linux, bool segments)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc, "i386");
diff --git a/gdb/arch/riscv.c b/gdb/arch/riscv.c
index 8f57090..a6538de 100644
--- a/gdb/arch/riscv.c
+++ b/gdb/arch/riscv.c
@@ -33,11 +33,11 @@
/* See arch/riscv.h. */
-STATIC_IN_GDB target_desc *
+STATIC_IN_GDB target_desc_up
riscv_create_target_description (const struct riscv_gdbarch_features features)
{
/* Now we should create a new target description. */
- target_desc *tdesc = allocate_target_description ();
+ target_desc_up tdesc = allocate_target_description ();
#ifndef IN_PROCESS_AGENT
std::string arch_name = "riscv";
@@ -56,22 +56,22 @@ riscv_create_target_description (const struct riscv_gdbarch_features features)
else if (features.flen == 16)
arch_name.append ("q");
- set_tdesc_architecture (tdesc, arch_name.c_str ());
+ set_tdesc_architecture (tdesc.get (), arch_name.c_str ());
#endif
long regnum = 0;
/* For now we only support creating 32-bit or 64-bit x-registers. */
if (features.xlen == 4)
- regnum = create_feature_riscv_32bit_cpu (tdesc, regnum);
+ regnum = create_feature_riscv_32bit_cpu (tdesc.get (), regnum);
else if (features.xlen == 8)
- regnum = create_feature_riscv_64bit_cpu (tdesc, regnum);
+ regnum = create_feature_riscv_64bit_cpu (tdesc.get (), regnum);
/* For now we only support creating 32-bit or 64-bit f-registers. */
if (features.flen == 4)
- regnum = create_feature_riscv_32bit_fpu (tdesc, regnum);
+ regnum = create_feature_riscv_32bit_fpu (tdesc.get (), regnum);
else if (features.flen == 8)
- regnum = create_feature_riscv_64bit_fpu (tdesc, regnum);
+ regnum = create_feature_riscv_64bit_fpu (tdesc.get (), regnum);
return tdesc;
}
@@ -106,13 +106,14 @@ riscv_lookup_target_description (const struct riscv_gdbarch_features features)
if (it != riscv_tdesc_cache.end ())
return it->second.get ();
- target_desc *tdesc = riscv_create_target_description (features);
+ target_desc_up tdesc (riscv_create_target_description (features));
- /* Add to the cache. Work around a problem with g++ 4.8 (PR96537):
- Call the target_desc_up constructor explictly instead of implicitly. */
- riscv_tdesc_cache.emplace (features, target_desc_up (tdesc));
-
- return tdesc;
+ /* Add to the cache, and return a pointer borrowed from the
+ target_desc_up. This is safe as the cache (and the pointers
+ contained within it) are not deleted until GDB exits. */
+ target_desc *ptr = tdesc.get ();
+ riscv_tdesc_cache.emplace (features, std::move (tdesc));
+ return ptr;
}
#endif /* !GDBSERVER */
diff --git a/gdb/arch/tic6x.c b/gdb/arch/tic6x.c
index 5f14d34..dad4dd8 100644
--- a/gdb/arch/tic6x.c
+++ b/gdb/arch/tic6x.c
@@ -28,7 +28,7 @@
target_desc *
tic6x_create_target_description (enum c6x_feature feature)
{
- target_desc *tdesc = allocate_target_description ();
+ target_desc *tdesc = allocate_target_description ().release ();
set_tdesc_architecture (tdesc, "tic6x");
set_tdesc_osabi (tdesc, "GNU/Linux");
diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c
index b39aa19..aa180bf 100644
--- a/gdb/features/microblaze-with-stack-protect.c
+++ b/gdb/features/microblaze-with-stack-protect.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_microblaze_with_stack_protect;
static void
initialize_tdesc_microblaze_with_stack_protect (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.microblaze.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -71,9 +71,9 @@ initialize_tdesc_microblaze_with_stack_protect (void)
tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int");
tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.microblaze.stack-protect");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect");
tdesc_create_reg (feature, "rslr", 57, 1, NULL, 32, "int");
tdesc_create_reg (feature, "rshr", 58, 1, NULL, 32, "int");
- tdesc_microblaze_with_stack_protect = result;
+ tdesc_microblaze_with_stack_protect = result.release ();
}
diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c
index 6c86fc0..ef2c64c 100644
--- a/gdb/features/microblaze.c
+++ b/gdb/features/microblaze.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_microblaze;
static void
initialize_tdesc_microblaze (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.microblaze.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -71,5 +71,5 @@ initialize_tdesc_microblaze (void)
tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int");
tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int");
- tdesc_microblaze = result;
+ tdesc_microblaze = result.release ();
}
diff --git a/gdb/features/mips-dsp-linux.c b/gdb/features/mips-dsp-linux.c
index 26e9c6b..76a9177 100644
--- a/gdb/features/mips-dsp-linux.c
+++ b/gdb/features/mips-dsp-linux.c
@@ -9,14 +9,14 @@ struct target_desc *tdesc_mips_dsp_linux;
static void
initialize_tdesc_mips_dsp_linux (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("mips"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
- set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+ set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -53,12 +53,12 @@ initialize_tdesc_mips_dsp_linux (void)
tdesc_create_reg (feature, "hi", 34, 1, NULL, 32, "int");
tdesc_create_reg (feature, "pc", 37, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cp0");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cp0");
tdesc_create_reg (feature, "status", 32, 1, NULL, 32, "int");
tdesc_create_reg (feature, "badvaddr", 35, 1, NULL, 32, "int");
tdesc_create_reg (feature, "cause", 36, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.fpu");
tdesc_create_reg (feature, "f0", 38, 1, NULL, 32, "ieee_single");
tdesc_create_reg (feature, "f1", 39, 1, NULL, 32, "ieee_single");
tdesc_create_reg (feature, "f2", 40, 1, NULL, 32, "ieee_single");
@@ -94,7 +94,7 @@ initialize_tdesc_mips_dsp_linux (void)
tdesc_create_reg (feature, "fcsr", 70, 1, "float", 32, "int");
tdesc_create_reg (feature, "fir", 71, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.dsp");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.dsp");
tdesc_create_reg (feature, "hi1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "lo1", 73, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hi2", 74, 1, NULL, 32, "int");
@@ -103,8 +103,8 @@ initialize_tdesc_mips_dsp_linux (void)
tdesc_create_reg (feature, "lo3", 77, 1, NULL, 32, "int");
tdesc_create_reg (feature, "dspctl", 78, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.linux");
tdesc_create_reg (feature, "restart", 79, 1, "system", 32, "int");
- tdesc_mips_dsp_linux = result;
+ tdesc_mips_dsp_linux = result.release ();
}
diff --git a/gdb/features/mips-linux.c b/gdb/features/mips-linux.c
index c9ad3ca..f97232c 100644
--- a/gdb/features/mips-linux.c
+++ b/gdb/features/mips-linux.c
@@ -9,14 +9,14 @@ struct target_desc *tdesc_mips_linux;
static void
initialize_tdesc_mips_linux (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("mips"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
- set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+ set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -53,12 +53,12 @@ initialize_tdesc_mips_linux (void)
tdesc_create_reg (feature, "hi", 34, 1, NULL, 32, "int");
tdesc_create_reg (feature, "pc", 37, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cp0");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cp0");
tdesc_create_reg (feature, "status", 32, 1, NULL, 32, "int");
tdesc_create_reg (feature, "badvaddr", 35, 1, NULL, 32, "int");
tdesc_create_reg (feature, "cause", 36, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.fpu");
tdesc_create_reg (feature, "f0", 38, 1, NULL, 32, "ieee_single");
tdesc_create_reg (feature, "f1", 39, 1, NULL, 32, "ieee_single");
tdesc_create_reg (feature, "f2", 40, 1, NULL, 32, "ieee_single");
@@ -94,8 +94,8 @@ initialize_tdesc_mips_linux (void)
tdesc_create_reg (feature, "fcsr", 70, 1, "float", 32, "int");
tdesc_create_reg (feature, "fir", 71, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.linux");
tdesc_create_reg (feature, "restart", 72, 1, "system", 32, "int");
- tdesc_mips_linux = result;
+ tdesc_mips_linux = result.release ();
}
diff --git a/gdb/features/mips64-dsp-linux.c b/gdb/features/mips64-dsp-linux.c
index 05317b7..48d212a 100644
--- a/gdb/features/mips64-dsp-linux.c
+++ b/gdb/features/mips64-dsp-linux.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_mips64_dsp_linux;
static void
initialize_tdesc_mips64_dsp_linux (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("mips"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "int");
@@ -51,12 +51,12 @@ initialize_tdesc_mips64_dsp_linux (void)
tdesc_create_reg (feature, "hi", 34, 1, NULL, 64, "int");
tdesc_create_reg (feature, "pc", 37, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cp0");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cp0");
tdesc_create_reg (feature, "status", 32, 1, NULL, 64, "int");
tdesc_create_reg (feature, "badvaddr", 35, 1, NULL, 64, "int");
tdesc_create_reg (feature, "cause", 36, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.fpu");
tdesc_create_reg (feature, "f0", 38, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 39, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 40, 1, NULL, 64, "ieee_double");
@@ -92,7 +92,7 @@ initialize_tdesc_mips64_dsp_linux (void)
tdesc_create_reg (feature, "fcsr", 70, 1, "float", 64, "int");
tdesc_create_reg (feature, "fir", 71, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.dsp");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.dsp");
tdesc_create_reg (feature, "hi1", 72, 1, NULL, 64, "int");
tdesc_create_reg (feature, "lo1", 73, 1, NULL, 64, "int");
tdesc_create_reg (feature, "hi2", 74, 1, NULL, 64, "int");
@@ -101,8 +101,8 @@ initialize_tdesc_mips64_dsp_linux (void)
tdesc_create_reg (feature, "lo3", 77, 1, NULL, 64, "int");
tdesc_create_reg (feature, "dspctl", 78, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.linux");
tdesc_create_reg (feature, "restart", 79, 1, "system", 64, "int");
- tdesc_mips64_dsp_linux = result;
+ tdesc_mips64_dsp_linux = result.release ();
}
diff --git a/gdb/features/mips64-linux.c b/gdb/features/mips64-linux.c
index 4814152..4b37d3d 100644
--- a/gdb/features/mips64-linux.c
+++ b/gdb/features/mips64-linux.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_mips64_linux;
static void
initialize_tdesc_mips64_linux (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("mips"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "int");
@@ -51,12 +51,12 @@ initialize_tdesc_mips64_linux (void)
tdesc_create_reg (feature, "hi", 34, 1, NULL, 64, "int");
tdesc_create_reg (feature, "pc", 37, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.cp0");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cp0");
tdesc_create_reg (feature, "status", 32, 1, NULL, 64, "int");
tdesc_create_reg (feature, "badvaddr", 35, 1, NULL, 64, "int");
tdesc_create_reg (feature, "cause", 36, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.fpu");
tdesc_create_reg (feature, "f0", 38, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 39, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 40, 1, NULL, 64, "ieee_double");
@@ -92,8 +92,8 @@ initialize_tdesc_mips64_linux (void)
tdesc_create_reg (feature, "fcsr", 70, 1, "float", 64, "int");
tdesc_create_reg (feature, "fir", 71, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.mips.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.linux");
tdesc_create_reg (feature, "restart", 72, 1, "system", 64, "int");
- tdesc_mips64_linux = result;
+ tdesc_mips64_linux = result.release ();
}
diff --git a/gdb/features/nds32.c b/gdb/features/nds32.c
index 89b246b..ed535b5 100644
--- a/gdb/features/nds32.c
+++ b/gdb/features/nds32.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_nds32;
static void
initialize_tdesc_nds32 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("n1h"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("n1h"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.nds32.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -49,7 +49,7 @@ initialize_tdesc_nds32 (void)
tdesc_create_reg (feature, "sp", 31, 1, NULL, 32, "data_ptr");
tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
- feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.nds32.fpu");
tdesc_create_reg (feature, "fd0", 33, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "fd1", 34, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "fd2", 35, 1, "float", 64, "ieee_double");
@@ -83,10 +83,10 @@ initialize_tdesc_nds32 (void)
tdesc_create_reg (feature, "fd30", 63, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "fd31", 64, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.system");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.nds32.system");
tdesc_create_reg (feature, "ir0", 65, 1, NULL, 32, "int");
tdesc_create_reg (feature, "itb", 66, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ifc_lp", 67, 1, NULL, 32, "int");
- tdesc_nds32 = result;
+ tdesc_nds32 = result.release ();
}
diff --git a/gdb/features/nios2.c b/gdb/features/nios2.c
index 705f499..6872aae 100644
--- a/gdb/features/nios2.c
+++ b/gdb/features/nios2.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_nios2;
static void
initialize_tdesc_nios2 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("nios2"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("nios2"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.nios2.cpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.nios2.cpu");
tdesc_create_reg (feature, "zero", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "at", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -65,5 +65,5 @@ initialize_tdesc_nios2 (void)
tdesc_create_reg (feature, "mpubase", 47, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "mpuacc", 48, 1, NULL, 32, "uint32");
- tdesc_nios2 = result;
+ tdesc_nios2 = result.release ();
}
diff --git a/gdb/features/or1k.c b/gdb/features/or1k.c
index 9169cae..c1fd26c 100644
--- a/gdb/features/or1k.c
+++ b/gdb/features/or1k.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_or1k;
static void
initialize_tdesc_or1k (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("or1k"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("or1k"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.or1k.group0");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.or1k.group0");
tdesc_type_with_fields *type_with_fields;
type_with_fields = tdesc_create_flags (feature, "sr_flags", 4);
tdesc_add_flag (type_with_fields, 0, "SM");
@@ -72,5 +72,5 @@ initialize_tdesc_or1k (void)
tdesc_create_reg (feature, "npc", 33, 1, NULL, 32, "code_ptr");
tdesc_create_reg (feature, "sr", 34, 1, NULL, 32, "sr_flags");
- tdesc_or1k = result;
+ tdesc_or1k = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-32.c b/gdb/features/rs6000/powerpc-32.c
index 39f5b14..4c766b7 100644
--- a/gdb/features/rs6000/powerpc-32.c
+++ b/gdb/features/rs6000/powerpc-32.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_32;
static void
initialize_tdesc_powerpc_32 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_32 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,5 +89,5 @@ initialize_tdesc_powerpc_32 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- tdesc_powerpc_32 = result;
+ tdesc_powerpc_32 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-32l.c b/gdb/features/rs6000/powerpc-32l.c
index 8089c04..34cba5d 100644
--- a/gdb/features/rs6000/powerpc-32l.c
+++ b/gdb/features/rs6000/powerpc-32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_32l;
static void
initialize_tdesc_powerpc_32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,9 +89,9 @@ initialize_tdesc_powerpc_32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- tdesc_powerpc_32l = result;
+ tdesc_powerpc_32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-403.c b/gdb/features/rs6000/powerpc-403.c
index a9106f5..1b16e08 100644
--- a/gdb/features/rs6000/powerpc-403.c
+++ b/gdb/features/rs6000/powerpc-403.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_403;
static void
initialize_tdesc_powerpc_403 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_403 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_403 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_403 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "403");
+ feature = tdesc_create_feature (result.get (), "403");
tdesc_create_reg (feature, "icdbdr", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "esr", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "dear", 121, 1, NULL, 32, "int");
@@ -163,5 +163,5 @@ initialize_tdesc_powerpc_403 (void)
tdesc_create_reg (feature, "pbl2", 141, 1, NULL, 32, "int");
tdesc_create_reg (feature, "pbu2", 142, 1, NULL, 32, "int");
- tdesc_powerpc_403 = result;
+ tdesc_powerpc_403 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-403gc.c b/gdb/features/rs6000/powerpc-403gc.c
index 402b747..4ff844d 100644
--- a/gdb/features/rs6000/powerpc-403gc.c
+++ b/gdb/features/rs6000/powerpc-403gc.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_403gc;
static void
initialize_tdesc_powerpc_403gc (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_403gc (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_403gc (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_403gc (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "403GC");
+ feature = tdesc_create_feature (result.get (), "403GC");
tdesc_create_reg (feature, "icdbdr", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "esr", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "dear", 121, 1, NULL, 32, "int");
@@ -169,5 +169,5 @@ initialize_tdesc_powerpc_403gc (void)
tdesc_create_reg (feature, "tbhu", 147, 1, NULL, 32, "int");
tdesc_create_reg (feature, "tblu", 148, 1, NULL, 32, "int");
- tdesc_powerpc_403gc = result;
+ tdesc_powerpc_403gc = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-405.c b/gdb/features/rs6000/powerpc-405.c
index bcfa144..4c97aa5 100644
--- a/gdb/features/rs6000/powerpc-405.c
+++ b/gdb/features/rs6000/powerpc-405.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_405;
static void
initialize_tdesc_powerpc_405 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_405 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_405 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "405");
+ feature = tdesc_create_feature (result.get (), "405");
tdesc_create_reg (feature, "pvr", 87, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sprg0", 108, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sprg1", 109, 1, NULL, 32, "int");
@@ -132,5 +132,5 @@ initialize_tdesc_powerpc_405 (void)
tdesc_create_reg (feature, "su0r", 160, 1, NULL, 32, "int");
tdesc_create_reg (feature, "usprg0", 161, 1, NULL, 32, "int");
- tdesc_powerpc_405 = result;
+ tdesc_powerpc_405 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-505.c b/gdb/features/rs6000/powerpc-505.c
index 09b0c7a..b9cae66 100644
--- a/gdb/features/rs6000/powerpc-505.c
+++ b/gdb/features/rs6000/powerpc-505.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_505;
static void
initialize_tdesc_powerpc_505 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_505 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_505 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,10 +137,10 @@ initialize_tdesc_powerpc_505 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "505");
+ feature = tdesc_create_feature (result.get (), "505");
tdesc_create_reg (feature, "eie", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "eid", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "nri", 121, 1, NULL, 32, "int");
- tdesc_powerpc_505 = result;
+ tdesc_powerpc_505 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-601.c b/gdb/features/rs6000/powerpc-601.c
index f30f5e6..ba35dc9 100644
--- a/gdb/features/rs6000/powerpc-601.c
+++ b/gdb/features/rs6000/powerpc-601.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_601;
static void
initialize_tdesc_powerpc_601 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -53,7 +53,7 @@ initialize_tdesc_powerpc_601 (void)
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "int");
tdesc_create_reg (feature, "mq", 124, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -88,7 +88,7 @@ initialize_tdesc_powerpc_601 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -138,7 +138,7 @@ initialize_tdesc_powerpc_601 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "601");
+ feature = tdesc_create_feature (result.get (), "601");
tdesc_create_reg (feature, "hid0", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hid1", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "iabr", 121, 1, NULL, 32, "int");
@@ -146,5 +146,5 @@ initialize_tdesc_powerpc_601 (void)
tdesc_create_reg (feature, "rtcu", 125, 1, NULL, 32, "int");
tdesc_create_reg (feature, "rtcl", 126, 1, NULL, 32, "int");
- tdesc_powerpc_601 = result;
+ tdesc_powerpc_601 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-602.c b/gdb/features/rs6000/powerpc-602.c
index 7696717..7f69f44 100644
--- a/gdb/features/rs6000/powerpc-602.c
+++ b/gdb/features/rs6000/powerpc-602.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_602;
static void
initialize_tdesc_powerpc_602 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_602 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_602 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_602 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "602");
+ feature = tdesc_create_feature (result.get (), "602");
tdesc_create_reg (feature, "hid0", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hid1", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "iabr", 121, 1, NULL, 32, "int");
@@ -149,5 +149,5 @@ initialize_tdesc_powerpc_602 (void)
tdesc_create_reg (feature, "sp", 129, 1, NULL, 32, "int");
tdesc_create_reg (feature, "lt", 130, 1, NULL, 32, "int");
- tdesc_powerpc_602 = result;
+ tdesc_powerpc_602 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-603.c b/gdb/features/rs6000/powerpc-603.c
index d5dae39..28c3628 100644
--- a/gdb/features/rs6000/powerpc-603.c
+++ b/gdb/features/rs6000/powerpc-603.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_603;
static void
initialize_tdesc_powerpc_603 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_603 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_603 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_603 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "603");
+ feature = tdesc_create_feature (result.get (), "603");
tdesc_create_reg (feature, "hid0", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hid1", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "iabr", 121, 1, NULL, 32, "int");
@@ -149,5 +149,5 @@ initialize_tdesc_powerpc_603 (void)
tdesc_create_reg (feature, "icmp", 129, 1, NULL, 32, "int");
tdesc_create_reg (feature, "rpa", 130, 1, NULL, 32, "int");
- tdesc_powerpc_603 = result;
+ tdesc_powerpc_603 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-604.c b/gdb/features/rs6000/powerpc-604.c
index 44dc8ca..fe0fe2f 100644
--- a/gdb/features/rs6000/powerpc-604.c
+++ b/gdb/features/rs6000/powerpc-604.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_604;
static void
initialize_tdesc_powerpc_604 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_604 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_604 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_604 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "604");
+ feature = tdesc_create_feature (result.get (), "604");
tdesc_create_reg (feature, "hid0", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hid1", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "iabr", 121, 1, NULL, 32, "int");
@@ -149,5 +149,5 @@ initialize_tdesc_powerpc_604 (void)
tdesc_create_reg (feature, "sia", 127, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sda", 128, 1, NULL, 32, "int");
- tdesc_powerpc_604 = result;
+ tdesc_powerpc_604 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-64.c b/gdb/features/rs6000/powerpc-64.c
index a9760a3..d0688ee 100644
--- a/gdb/features/rs6000/powerpc-64.c
+++ b/gdb/features/rs6000/powerpc-64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_64;
static void
initialize_tdesc_powerpc_64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_64 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,5 +89,5 @@ initialize_tdesc_powerpc_64 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- tdesc_powerpc_64 = result;
+ tdesc_powerpc_64 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-64l.c b/gdb/features/rs6000/powerpc-64l.c
index 408794e..465c023 100644
--- a/gdb/features/rs6000/powerpc-64l.c
+++ b/gdb/features/rs6000/powerpc-64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_64l;
static void
initialize_tdesc_powerpc_64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,9 +89,9 @@ initialize_tdesc_powerpc_64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- tdesc_powerpc_64l = result;
+ tdesc_powerpc_64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-7400.c b/gdb/features/rs6000/powerpc-7400.c
index 58f8a69..0e71dd7 100644
--- a/gdb/features/rs6000/powerpc-7400.c
+++ b/gdb/features/rs6000/powerpc-7400.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_7400;
static void
initialize_tdesc_powerpc_7400 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_7400 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_7400 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_7400 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -200,5 +200,5 @@ initialize_tdesc_powerpc_7400 (void)
tdesc_create_reg (feature, "vscr", 151, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 152, 1, "vector", 32, "int");
- tdesc_powerpc_7400 = result;
+ tdesc_powerpc_7400 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-750.c b/gdb/features/rs6000/powerpc-750.c
index 099a478..396ec45 100644
--- a/gdb/features/rs6000/powerpc-750.c
+++ b/gdb/features/rs6000/powerpc-750.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_750;
static void
initialize_tdesc_powerpc_750 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_750 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_750 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_750 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "750");
+ feature = tdesc_create_feature (result.get (), "750");
tdesc_create_reg (feature, "hid0", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "hid1", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "iabr", 121, 1, NULL, 32, "int");
@@ -162,5 +162,5 @@ initialize_tdesc_powerpc_750 (void)
tdesc_create_reg (feature, "thrm2", 141, 1, NULL, 32, "int");
tdesc_create_reg (feature, "thrm3", 142, 1, NULL, 32, "int");
- tdesc_powerpc_750 = result;
+ tdesc_powerpc_750 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-860.c b/gdb/features/rs6000/powerpc-860.c
index 0692feb..328ad19 100644
--- a/gdb/features/rs6000/powerpc-860.c
+++ b/gdb/features/rs6000/powerpc-860.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_powerpc_860;
static void
initialize_tdesc_powerpc_860 (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_powerpc_860 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -87,7 +87,7 @@ initialize_tdesc_powerpc_860 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "OEA");
+ feature = tdesc_create_feature (result.get (), "OEA");
tdesc_create_reg (feature, "sr0", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr1", 72, 1, NULL, 32, "int");
tdesc_create_reg (feature, "sr2", 73, 1, NULL, 32, "int");
@@ -137,7 +137,7 @@ initialize_tdesc_powerpc_860 (void)
tdesc_create_reg (feature, "dabr", 117, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ear", 118, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "860");
+ feature = tdesc_create_feature (result.get (), "860");
tdesc_create_reg (feature, "eie", 119, 1, NULL, 32, "int");
tdesc_create_reg (feature, "eid", 120, 1, NULL, 32, "int");
tdesc_create_reg (feature, "nri", 121, 1, NULL, 32, "int");
@@ -186,5 +186,5 @@ initialize_tdesc_powerpc_860 (void)
tdesc_create_reg (feature, "md_dbram0", 164, 1, NULL, 32, "int");
tdesc_create_reg (feature, "md_dbram1", 165, 1, NULL, 32, "int");
- tdesc_powerpc_860 = result;
+ tdesc_powerpc_860 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-altivec32.c b/gdb/features/rs6000/powerpc-altivec32.c
index bbb36c8..743ca06 100644
--- a/gdb/features/rs6000/powerpc-altivec32.c
+++ b/gdb/features/rs6000/powerpc-altivec32.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_altivec32;
static void
initialize_tdesc_powerpc_altivec32 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_altivec32 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,7 +89,7 @@ initialize_tdesc_powerpc_altivec32 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -152,5 +152,5 @@ initialize_tdesc_powerpc_altivec32 (void)
tdesc_create_reg (feature, "vscr", 103, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 104, 1, "vector", 32, "int");
- tdesc_powerpc_altivec32 = result;
+ tdesc_powerpc_altivec32 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-altivec32l.c b/gdb/features/rs6000/powerpc-altivec32l.c
index 81862cb..a19016b 100644
--- a/gdb/features/rs6000/powerpc-altivec32l.c
+++ b/gdb/features/rs6000/powerpc-altivec32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_altivec32l;
static void
initialize_tdesc_powerpc_altivec32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_altivec32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_altivec32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,5 +156,5 @@ initialize_tdesc_powerpc_altivec32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- tdesc_powerpc_altivec32l = result;
+ tdesc_powerpc_altivec32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-altivec64.c b/gdb/features/rs6000/powerpc-altivec64.c
index f7a7c72..b8a157b 100644
--- a/gdb/features/rs6000/powerpc-altivec64.c
+++ b/gdb/features/rs6000/powerpc-altivec64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_altivec64;
static void
initialize_tdesc_powerpc_altivec64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_altivec64 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,7 +89,7 @@ initialize_tdesc_powerpc_altivec64 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -152,5 +152,5 @@ initialize_tdesc_powerpc_altivec64 (void)
tdesc_create_reg (feature, "vscr", 103, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 104, 1, "vector", 32, "int");
- tdesc_powerpc_altivec64 = result;
+ tdesc_powerpc_altivec64 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-altivec64l.c b/gdb/features/rs6000/powerpc-altivec64l.c
index ce0bc86..1846d06 100644
--- a/gdb/features/rs6000/powerpc-altivec64l.c
+++ b/gdb/features/rs6000/powerpc-altivec64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_altivec64l;
static void
initialize_tdesc_powerpc_altivec64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_altivec64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_altivec64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,5 +156,5 @@ initialize_tdesc_powerpc_altivec64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- tdesc_powerpc_altivec64l = result;
+ tdesc_powerpc_altivec64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-e500.c b/gdb/features/rs6000/powerpc-e500.c
index 4466bc7..bf62405 100644
--- a/gdb/features/rs6000/powerpc-e500.c
+++ b/gdb/features/rs6000/powerpc-e500.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_e500;
static void
initialize_tdesc_powerpc_e500 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:e500"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:e500"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_e500 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.spe");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.spe");
tdesc_create_reg (feature, "ev0h", 32, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ev1h", 33, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ev2h", 34, 1, NULL, 32, "int");
@@ -90,5 +90,5 @@ initialize_tdesc_powerpc_e500 (void)
tdesc_create_reg (feature, "acc", 73, 1, NULL, 64, "int");
tdesc_create_reg (feature, "spefscr", 74, 1, NULL, 32, "int");
- tdesc_powerpc_e500 = result;
+ tdesc_powerpc_e500 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-e500l.c b/gdb/features/rs6000/powerpc-e500l.c
index 61acbf3..8199989 100644
--- a/gdb/features/rs6000/powerpc-e500l.c
+++ b/gdb/features/rs6000/powerpc-e500l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_e500l;
static void
initialize_tdesc_powerpc_e500l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:e500"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:e500"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_e500l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.spe");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.spe");
tdesc_create_reg (feature, "ev0h", 32, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ev1h", 33, 1, NULL, 32, "int");
tdesc_create_reg (feature, "ev2h", 34, 1, NULL, 32, "int");
@@ -90,9 +90,9 @@ initialize_tdesc_powerpc_e500l (void)
tdesc_create_reg (feature, "acc", 73, 1, NULL, 64, "int");
tdesc_create_reg (feature, "spefscr", 74, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- tdesc_powerpc_e500l = result;
+ tdesc_powerpc_e500l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-32l.c b/gdb/features/rs6000/powerpc-isa205-32l.c
index de6548f..7791fa7 100644
--- a/gdb/features/rs6000/powerpc-isa205-32l.c
+++ b/gdb/features/rs6000/powerpc-isa205-32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_32l;
static void
initialize_tdesc_powerpc_isa205_32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,9 +89,9 @@ initialize_tdesc_powerpc_isa205_32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- tdesc_powerpc_isa205_32l = result;
+ tdesc_powerpc_isa205_32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-64l.c b/gdb/features/rs6000/powerpc-isa205-64l.c
index cd3b2c1..fb05df7 100644
--- a/gdb/features/rs6000/powerpc-isa205-64l.c
+++ b/gdb/features/rs6000/powerpc-isa205-64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_64l;
static void
initialize_tdesc_powerpc_isa205_64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,9 +89,9 @@ initialize_tdesc_powerpc_isa205_64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- tdesc_powerpc_isa205_64l = result;
+ tdesc_powerpc_isa205_64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-altivec32l.c b/gdb/features/rs6000/powerpc-isa205-altivec32l.c
index 09f5c07..a510931 100644
--- a/gdb/features/rs6000/powerpc-isa205-altivec32l.c
+++ b/gdb/features/rs6000/powerpc-isa205-altivec32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_altivec32l;
static void
initialize_tdesc_powerpc_isa205_altivec32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_altivec32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_altivec32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,5 +156,5 @@ initialize_tdesc_powerpc_isa205_altivec32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- tdesc_powerpc_isa205_altivec32l = result;
+ tdesc_powerpc_isa205_altivec32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-altivec64l.c b/gdb/features/rs6000/powerpc-isa205-altivec64l.c
index 246fcef..f91c2e8 100644
--- a/gdb/features/rs6000/powerpc-isa205-altivec64l.c
+++ b/gdb/features/rs6000/powerpc-isa205-altivec64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_altivec64l;
static void
initialize_tdesc_powerpc_isa205_altivec64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_altivec64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_altivec64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,5 +156,5 @@ initialize_tdesc_powerpc_isa205_altivec64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- tdesc_powerpc_isa205_altivec64l = result;
+ tdesc_powerpc_isa205_altivec64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c
index c8f56ea..28a7c3b 100644
--- a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c
+++ b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_ppr_dscr_vsx32l;
static void
initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,11 +190,11 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- tdesc_powerpc_isa205_ppr_dscr_vsx32l = result;
+ tdesc_powerpc_isa205_ppr_dscr_vsx32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c
index 76e32f3..d34a197 100644
--- a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c
+++ b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_ppr_dscr_vsx64l;
static void
initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,11 +190,11 @@ initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- tdesc_powerpc_isa205_ppr_dscr_vsx64l = result;
+ tdesc_powerpc_isa205_ppr_dscr_vsx64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-vsx32l.c b/gdb/features/rs6000/powerpc-isa205-vsx32l.c
index 2a6e232..7639155 100644
--- a/gdb/features/rs6000/powerpc-isa205-vsx32l.c
+++ b/gdb/features/rs6000/powerpc-isa205-vsx32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_vsx32l;
static void
initialize_tdesc_powerpc_isa205_vsx32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_vsx32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_vsx32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa205_vsx32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,5 +190,5 @@ initialize_tdesc_powerpc_isa205_vsx32l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- tdesc_powerpc_isa205_vsx32l = result;
+ tdesc_powerpc_isa205_vsx32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa205-vsx64l.c b/gdb/features/rs6000/powerpc-isa205-vsx64l.c
index d0e32f2..fad4227 100644
--- a/gdb/features/rs6000/powerpc-isa205-vsx64l.c
+++ b/gdb/features/rs6000/powerpc-isa205-vsx64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa205_vsx64l;
static void
initialize_tdesc_powerpc_isa205_vsx64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa205_vsx64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa205_vsx64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa205_vsx64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,5 +190,5 @@ initialize_tdesc_powerpc_isa205_vsx64l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- tdesc_powerpc_isa205_vsx64l = result;
+ tdesc_powerpc_isa205_vsx64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c b/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c
index e1b933c..78f2047 100644
--- a/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c
+++ b/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa207_htm_vsx32l;
static void
initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,33 +190,33 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.tar");
tdesc_create_reg (feature, "tar", 141, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ebb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ebb");
tdesc_create_reg (feature, "bescr", 142, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbhr", 143, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbrr", 144, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux.pmu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux.pmu");
tdesc_create_reg (feature, "mmcr0", 145, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "mmcr2", 146, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "siar", 147, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sdar", 148, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sier", 149, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.spr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.spr");
tdesc_create_reg (feature, "tfhar", 150, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "texasr", 151, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "tfiar", 152, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.core");
tdesc_create_reg (feature, "cr0", 153, 0, NULL, 32, "uint32");
tdesc_create_reg (feature, "cr1", 154, 0, NULL, 32, "uint32");
tdesc_create_reg (feature, "cr2", 155, 0, NULL, 32, "uint32");
@@ -254,7 +254,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "clr", 187, 0, NULL, 32, "code_ptr");
tdesc_create_reg (feature, "cctr", 188, 0, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.fpu");
tdesc_create_reg (feature, "cf0", 189, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cf1", 190, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cf2", 191, 0, NULL, 64, "ieee_double");
@@ -289,7 +289,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "cf31", 220, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cfpscr", 221, 0, "float", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.altivec");
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -349,7 +349,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "cvscr", 254, 0, "vector", 32, "int");
tdesc_create_reg (feature, "cvrsave", 255, 0, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.vsx");
tdesc_create_reg (feature, "cvs0h", 256, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs1h", 257, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs2h", 258, 0, NULL, 64, "uint64");
@@ -383,14 +383,14 @@ initialize_tdesc_powerpc_isa207_htm_vsx32l (void)
tdesc_create_reg (feature, "cvs30h", 286, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs31h", 287, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.ppr");
tdesc_create_reg (feature, "cppr", 288, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.dscr");
tdesc_create_reg (feature, "cdscr", 289, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.tar");
tdesc_create_reg (feature, "ctar", 290, 0, NULL, 64, "uint64");
- tdesc_powerpc_isa207_htm_vsx32l = result;
+ tdesc_powerpc_isa207_htm_vsx32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c b/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c
index 0d818d0..5517201 100644
--- a/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c
+++ b/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa207_htm_vsx64l;
static void
initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,33 +190,33 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.tar");
tdesc_create_reg (feature, "tar", 141, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ebb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ebb");
tdesc_create_reg (feature, "bescr", 142, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbhr", 143, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbrr", 144, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux.pmu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux.pmu");
tdesc_create_reg (feature, "mmcr0", 145, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "mmcr2", 146, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "siar", 147, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sdar", 148, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sier", 149, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.spr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.spr");
tdesc_create_reg (feature, "tfhar", 150, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "texasr", 151, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "tfiar", 152, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.core");
tdesc_create_reg (feature, "cr0", 153, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cr1", 154, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cr2", 155, 0, NULL, 64, "uint64");
@@ -254,7 +254,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "clr", 187, 0, NULL, 64, "code_ptr");
tdesc_create_reg (feature, "cctr", 188, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.fpu");
tdesc_create_reg (feature, "cf0", 189, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cf1", 190, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cf2", 191, 0, NULL, 64, "ieee_double");
@@ -289,7 +289,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "cf31", 220, 0, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "cfpscr", 221, 0, "float", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.altivec");
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -349,7 +349,7 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "cvscr", 254, 0, "vector", 32, "int");
tdesc_create_reg (feature, "cvrsave", 255, 0, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.vsx");
tdesc_create_reg (feature, "cvs0h", 256, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs1h", 257, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs2h", 258, 0, NULL, 64, "uint64");
@@ -383,14 +383,14 @@ initialize_tdesc_powerpc_isa207_htm_vsx64l (void)
tdesc_create_reg (feature, "cvs30h", 286, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "cvs31h", 287, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.ppr");
tdesc_create_reg (feature, "cppr", 288, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.dscr");
tdesc_create_reg (feature, "cdscr", 289, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.htm.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.htm.tar");
tdesc_create_reg (feature, "ctar", 290, 0, NULL, 64, "uint64");
- tdesc_powerpc_isa207_htm_vsx64l = result;
+ tdesc_powerpc_isa207_htm_vsx64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa207-vsx32l.c b/gdb/features/rs6000/powerpc-isa207-vsx32l.c
index 8fe0f5e..7fc15bf 100644
--- a/gdb/features/rs6000/powerpc-isa207-vsx32l.c
+++ b/gdb/features/rs6000/powerpc-isa207-vsx32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa207_vsx32l;
static void
initialize_tdesc_powerpc_isa207_vsx32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa207_vsx32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa207_vsx32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa207_vsx32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,26 +190,26 @@ initialize_tdesc_powerpc_isa207_vsx32l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.tar");
tdesc_create_reg (feature, "tar", 141, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ebb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ebb");
tdesc_create_reg (feature, "bescr", 142, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbhr", 143, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbrr", 144, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux.pmu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux.pmu");
tdesc_create_reg (feature, "mmcr0", 145, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "mmcr2", 146, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "siar", 147, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sdar", 148, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sier", 149, 0, NULL, 64, "uint64");
- tdesc_powerpc_isa207_vsx32l = result;
+ tdesc_powerpc_isa207_vsx32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-isa207-vsx64l.c b/gdb/features/rs6000/powerpc-isa207-vsx64l.c
index 0af1879..3ad55f7 100644
--- a/gdb/features/rs6000/powerpc-isa207-vsx64l.c
+++ b/gdb/features/rs6000/powerpc-isa207-vsx64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_isa207_vsx64l;
static void
initialize_tdesc_powerpc_isa207_vsx64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_isa207_vsx64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_isa207_vsx64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_isa207_vsx64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,26 +190,26 @@ initialize_tdesc_powerpc_isa207_vsx64l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ppr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ppr");
tdesc_create_reg (feature, "ppr", 139, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.dscr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.dscr");
tdesc_create_reg (feature, "dscr", 140, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.tar");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.tar");
tdesc_create_reg (feature, "tar", 141, 1, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.ebb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.ebb");
tdesc_create_reg (feature, "bescr", 142, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbhr", 143, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "ebbrr", 144, 0, NULL, 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux.pmu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux.pmu");
tdesc_create_reg (feature, "mmcr0", 145, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "mmcr2", 146, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "siar", 147, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sdar", 148, 0, NULL, 64, "uint64");
tdesc_create_reg (feature, "sier", 149, 0, NULL, 64, "uint64");
- tdesc_powerpc_isa207_vsx64l = result;
+ tdesc_powerpc_isa207_vsx64l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-vsx32.c b/gdb/features/rs6000/powerpc-vsx32.c
index 9eafb1c..d7278d9 100644
--- a/gdb/features/rs6000/powerpc-vsx32.c
+++ b/gdb/features/rs6000/powerpc-vsx32.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_vsx32;
static void
initialize_tdesc_powerpc_vsx32 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_vsx32 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,7 +89,7 @@ initialize_tdesc_powerpc_vsx32 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -152,7 +152,7 @@ initialize_tdesc_powerpc_vsx32 (void)
tdesc_create_reg (feature, "vscr", 103, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 104, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 105, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 106, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 107, 1, NULL, 64, "uint64");
@@ -186,5 +186,5 @@ initialize_tdesc_powerpc_vsx32 (void)
tdesc_create_reg (feature, "vs30h", 135, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 136, 1, NULL, 64, "uint64");
- tdesc_powerpc_vsx32 = result;
+ tdesc_powerpc_vsx32 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-vsx32l.c b/gdb/features/rs6000/powerpc-vsx32l.c
index f08df14..7097ffa 100644
--- a/gdb/features/rs6000/powerpc-vsx32l.c
+++ b/gdb/features/rs6000/powerpc-vsx32l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_vsx32l;
static void
initialize_tdesc_powerpc_vsx32l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_vsx32l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_vsx32l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_vsx32l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,5 +190,5 @@ initialize_tdesc_powerpc_vsx32l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- tdesc_powerpc_vsx32l = result;
+ tdesc_powerpc_vsx32l = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-vsx64.c b/gdb/features/rs6000/powerpc-vsx64.c
index 7991115..7e90559 100644
--- a/gdb/features/rs6000/powerpc-vsx64.c
+++ b/gdb/features/rs6000/powerpc-vsx64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_vsx64;
static void
initialize_tdesc_powerpc_vsx64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_vsx64 (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,7 +89,7 @@ initialize_tdesc_powerpc_vsx64 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -152,7 +152,7 @@ initialize_tdesc_powerpc_vsx64 (void)
tdesc_create_reg (feature, "vscr", 103, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 104, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 105, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 106, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 107, 1, NULL, 64, "uint64");
@@ -186,5 +186,5 @@ initialize_tdesc_powerpc_vsx64 (void)
tdesc_create_reg (feature, "vs30h", 135, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 136, 1, NULL, 64, "uint64");
- tdesc_powerpc_vsx64 = result;
+ tdesc_powerpc_vsx64 = result.release ();
}
diff --git a/gdb/features/rs6000/powerpc-vsx64l.c b/gdb/features/rs6000/powerpc-vsx64l.c
index 1726e67..4affa35 100644
--- a/gdb/features/rs6000/powerpc-vsx64l.c
+++ b/gdb/features/rs6000/powerpc-vsx64l.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_powerpc_vsx64l;
static void
initialize_tdesc_powerpc_vsx64l (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("powerpc:common64"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
@@ -54,7 +54,7 @@ initialize_tdesc_powerpc_vsx64l (void)
tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -89,11 +89,11 @@ initialize_tdesc_powerpc_vsx64l (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.linux");
tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.altivec");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -156,7 +156,7 @@ initialize_tdesc_powerpc_vsx64l (void)
tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.vsx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.vsx");
tdesc_create_reg (feature, "vs0h", 107, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs1h", 108, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs2h", 109, 1, NULL, 64, "uint64");
@@ -190,5 +190,5 @@ initialize_tdesc_powerpc_vsx64l (void)
tdesc_create_reg (feature, "vs30h", 137, 1, NULL, 64, "uint64");
tdesc_create_reg (feature, "vs31h", 138, 1, NULL, 64, "uint64");
- tdesc_powerpc_vsx64l = result;
+ tdesc_powerpc_vsx64l = result.release ();
}
diff --git a/gdb/features/rs6000/rs6000.c b/gdb/features/rs6000/rs6000.c
index 709b5da..826d9ad 100644
--- a/gdb/features/rs6000/rs6000.c
+++ b/gdb/features/rs6000/rs6000.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_rs6000;
static void
initialize_tdesc_rs6000 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("rs6000:6000"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("rs6000:6000"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.core");
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
@@ -55,7 +55,7 @@ initialize_tdesc_rs6000 (void)
tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "int");
tdesc_create_reg (feature, "mq", 70, 1, NULL, 32, "int");
- feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.power.fpu");
tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
@@ -90,5 +90,5 @@ initialize_tdesc_rs6000 (void)
tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
tdesc_create_reg (feature, "fpscr", 71, 1, "float", 32, "int");
- tdesc_rs6000 = result;
+ tdesc_rs6000 = result.release ();
}
diff --git a/gdb/features/rx.c b/gdb/features/rx.c
index d2c29c1..ebbc504 100644
--- a/gdb/features/rx.c
+++ b/gdb/features/rx.c
@@ -9,10 +9,10 @@ struct target_desc *tdesc_rx;
static void
initialize_tdesc_rx (void)
{
- struct target_desc *result = allocate_target_description ();
+ target_desc_up result = allocate_target_description ();
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.rx.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.rx.core");
tdesc_type_with_fields *type_with_fields;
type_with_fields = tdesc_create_flags (feature, "psw_flags", 4);
tdesc_add_flag (type_with_fields, 0, "C");
@@ -76,5 +76,5 @@ initialize_tdesc_rx (void)
tdesc_create_reg (feature, "fpsw", 24, 1, NULL, 32, "fpsw_flags");
tdesc_create_reg (feature, "acc", 25, 1, NULL, 64, "uint64");
- tdesc_rx = result;
+ tdesc_rx = result.release ();
}
diff --git a/gdb/features/s390-gs-linux64.c b/gdb/features/s390-gs-linux64.c
index 1416183..331b6e2 100644
--- a/gdb/features/s390-gs-linux64.c
+++ b/gdb/features/s390-gs-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_gs_linux64;
static void
initialize_tdesc_s390_gs_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_gs_linux64 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_gs_linux64 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,12 +87,12 @@ initialize_tdesc_s390_gs_linux64 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 70, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 71, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 72, 1, "tdb", 64, "uint64");
@@ -114,7 +114,7 @@ initialize_tdesc_s390_gs_linux64 (void)
tdesc_create_reg (feature, "tr14", 88, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 89, 1, "tdb", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -185,15 +185,15 @@ initialize_tdesc_s390_gs_linux64 (void)
tdesc_create_reg (feature, "v30", 120, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 121, 1, NULL, 128, "vec128");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.gs");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.gs");
tdesc_create_reg (feature, "gsd", 122, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "gssm", 123, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "gsepla", 124, 1, "gs", 64, "data_ptr");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.gsbc");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.gsbc");
tdesc_create_reg (feature, "bc_gsd", 125, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "bc_gssm", 126, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "bc_gsepla", 127, 1, "gs", 64, "data_ptr");
- tdesc_s390_gs_linux64 = result;
+ tdesc_s390_gs_linux64 = result.release ();
}
diff --git a/gdb/features/s390-linux32.c b/gdb/features/s390-linux32.c
index 01c136c..18b0d0f 100644
--- a/gdb/features/s390-linux32.c
+++ b/gdb/features/s390-linux32.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux32;
static void
initialize_tdesc_s390_linux32 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0", 2, 1, "general", 32, "uint32");
@@ -34,7 +34,7 @@ initialize_tdesc_s390_linux32 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 32, "uint32");
tdesc_create_reg (feature, "r15", 17, 1, "general", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390_linux32 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,8 +71,8 @@ initialize_tdesc_s390_linux32 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 32, "uint32");
- tdesc_s390_linux32 = result;
+ tdesc_s390_linux32 = result.release ();
}
diff --git a/gdb/features/s390-linux32v1.c b/gdb/features/s390-linux32v1.c
index 65a4a50..d1180f9 100644
--- a/gdb/features/s390-linux32v1.c
+++ b/gdb/features/s390-linux32v1.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux32v1;
static void
initialize_tdesc_s390_linux32v1 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0", 2, 1, "general", 32, "uint32");
@@ -34,7 +34,7 @@ initialize_tdesc_s390_linux32v1 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 32, "uint32");
tdesc_create_reg (feature, "r15", 17, 1, "general", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390_linux32v1 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,9 +71,9 @@ initialize_tdesc_s390_linux32v1 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 32, "code_ptr");
- tdesc_s390_linux32v1 = result;
+ tdesc_s390_linux32v1 = result.release ();
}
diff --git a/gdb/features/s390-linux32v2.c b/gdb/features/s390-linux32v2.c
index b5d25ec..d1da31a 100644
--- a/gdb/features/s390-linux32v2.c
+++ b/gdb/features/s390-linux32v2.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux32v2;
static void
initialize_tdesc_s390_linux32v2 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0", 2, 1, "general", 32, "uint32");
@@ -34,7 +34,7 @@ initialize_tdesc_s390_linux32v2 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 32, "uint32");
tdesc_create_reg (feature, "r15", 17, 1, "general", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390_linux32v2 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,10 +71,10 @@ initialize_tdesc_s390_linux32v2 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- tdesc_s390_linux32v2 = result;
+ tdesc_s390_linux32v2 = result.release ();
}
diff --git a/gdb/features/s390-linux64.c b/gdb/features/s390-linux64.c
index 531d3a1..235da0f 100644
--- a/gdb/features/s390-linux64.c
+++ b/gdb/features/s390-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux64;
static void
initialize_tdesc_s390_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_linux64 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_linux64 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,8 +87,8 @@ initialize_tdesc_s390_linux64 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
- tdesc_s390_linux64 = result;
+ tdesc_s390_linux64 = result.release ();
}
diff --git a/gdb/features/s390-linux64v1.c b/gdb/features/s390-linux64v1.c
index d75deca..108c0ef 100644
--- a/gdb/features/s390-linux64v1.c
+++ b/gdb/features/s390-linux64v1.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux64v1;
static void
initialize_tdesc_s390_linux64v1 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_linux64v1 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_linux64v1 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,9 +87,9 @@ initialize_tdesc_s390_linux64v1 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
- tdesc_s390_linux64v1 = result;
+ tdesc_s390_linux64v1 = result.release ();
}
diff --git a/gdb/features/s390-linux64v2.c b/gdb/features/s390-linux64v2.c
index bd10ee8..057a129 100644
--- a/gdb/features/s390-linux64v2.c
+++ b/gdb/features/s390-linux64v2.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_linux64v2;
static void
initialize_tdesc_s390_linux64v2 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_linux64v2 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_linux64v2 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,10 +87,10 @@ initialize_tdesc_s390_linux64v2 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");
- tdesc_s390_linux64v2 = result;
+ tdesc_s390_linux64v2 = result.release ();
}
diff --git a/gdb/features/s390-te-linux64.c b/gdb/features/s390-te-linux64.c
index fe2020a..f8f2217 100644
--- a/gdb/features/s390-te-linux64.c
+++ b/gdb/features/s390-te-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_te_linux64;
static void
initialize_tdesc_s390_te_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_te_linux64 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_te_linux64 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,12 +87,12 @@ initialize_tdesc_s390_te_linux64 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 70, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 71, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 72, 1, "tdb", 64, "uint64");
@@ -114,5 +114,5 @@ initialize_tdesc_s390_te_linux64 (void)
tdesc_create_reg (feature, "tr14", 88, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 89, 1, "tdb", 64, "uint64");
- tdesc_s390_te_linux64 = result;
+ tdesc_s390_te_linux64 = result.release ();
}
diff --git a/gdb/features/s390-tevx-linux64.c b/gdb/features/s390-tevx-linux64.c
index ae62e8d..cbc2077 100644
--- a/gdb/features/s390-tevx-linux64.c
+++ b/gdb/features/s390-tevx-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_tevx_linux64;
static void
initialize_tdesc_s390_tevx_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_tevx_linux64 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_tevx_linux64 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,12 +87,12 @@ initialize_tdesc_s390_tevx_linux64 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 70, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 71, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 72, 1, "tdb", 64, "uint64");
@@ -114,7 +114,7 @@ initialize_tdesc_s390_tevx_linux64 (void)
tdesc_create_reg (feature, "tr14", 88, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 89, 1, "tdb", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -185,5 +185,5 @@ initialize_tdesc_s390_tevx_linux64 (void)
tdesc_create_reg (feature, "v30", 120, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 121, 1, NULL, 128, "vec128");
- tdesc_s390_tevx_linux64 = result;
+ tdesc_s390_tevx_linux64 = result.release ();
}
diff --git a/gdb/features/s390-vx-linux64.c b/gdb/features/s390-vx-linux64.c
index d3ec081..779332c 100644
--- a/gdb/features/s390-vx-linux64.c
+++ b/gdb/features/s390-vx-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390_vx_linux64;
static void
initialize_tdesc_s390_vx_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 32, "uint32");
tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
@@ -50,7 +50,7 @@ initialize_tdesc_s390_vx_linux64 (void)
tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
@@ -68,7 +68,7 @@ initialize_tdesc_s390_vx_linux64 (void)
tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
@@ -87,12 +87,12 @@ initialize_tdesc_s390_vx_linux64 (void)
tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 67, 1, "system", 32, "uint32");
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -163,5 +163,5 @@ initialize_tdesc_s390_vx_linux64 (void)
tdesc_create_reg (feature, "v30", 100, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 101, 1, NULL, 128, "vec128");
- tdesc_s390_vx_linux64 = result;
+ tdesc_s390_vx_linux64 = result.release ();
}
diff --git a/gdb/features/s390x-gs-linux64.c b/gdb/features/s390x-gs-linux64.c
index d253a09..a779daf 100644
--- a/gdb/features/s390x-gs-linux64.c
+++ b/gdb/features/s390x-gs-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_gs_linux64;
static void
initialize_tdesc_s390x_gs_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_gs_linux64 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_gs_linux64 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,12 +71,12 @@ initialize_tdesc_s390x_gs_linux64 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 54, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 55, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 56, 1, "tdb", 64, "uint64");
@@ -98,7 +98,7 @@ initialize_tdesc_s390x_gs_linux64 (void)
tdesc_create_reg (feature, "tr14", 72, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 73, 1, "tdb", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -169,15 +169,15 @@ initialize_tdesc_s390x_gs_linux64 (void)
tdesc_create_reg (feature, "v30", 104, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 105, 1, NULL, 128, "vec128");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.gs");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.gs");
tdesc_create_reg (feature, "gsd", 106, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "gssm", 107, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "gsepla", 108, 1, "gs", 64, "data_ptr");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.gsbc");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.gsbc");
tdesc_create_reg (feature, "bc_gsd", 109, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "bc_gssm", 110, 1, "gs", 64, "uint64");
tdesc_create_reg (feature, "bc_gsepla", 111, 1, "gs", 64, "data_ptr");
- tdesc_s390x_gs_linux64 = result;
+ tdesc_s390x_gs_linux64 = result.release ();
}
diff --git a/gdb/features/s390x-linux64.c b/gdb/features/s390x-linux64.c
index 9d48ea3..f8097e9 100644
--- a/gdb/features/s390x-linux64.c
+++ b/gdb/features/s390x-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_linux64;
static void
initialize_tdesc_s390x_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_linux64 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_linux64 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,8 +71,8 @@ initialize_tdesc_s390x_linux64 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
- tdesc_s390x_linux64 = result;
+ tdesc_s390x_linux64 = result.release ();
}
diff --git a/gdb/features/s390x-linux64v1.c b/gdb/features/s390x-linux64v1.c
index b95f1c4..c79ee40 100644
--- a/gdb/features/s390x-linux64v1.c
+++ b/gdb/features/s390x-linux64v1.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_linux64v1;
static void
initialize_tdesc_s390x_linux64v1 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_linux64v1 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_linux64v1 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,9 +71,9 @@ initialize_tdesc_s390x_linux64v1 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
- tdesc_s390x_linux64v1 = result;
+ tdesc_s390x_linux64v1 = result.release ();
}
diff --git a/gdb/features/s390x-linux64v2.c b/gdb/features/s390x-linux64v2.c
index 9aab89f..9500917 100644
--- a/gdb/features/s390x-linux64v2.c
+++ b/gdb/features/s390x-linux64v2.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_linux64v2;
static void
initialize_tdesc_s390x_linux64v2 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_linux64v2 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_linux64v2 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,10 +71,10 @@ initialize_tdesc_s390x_linux64v2 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- tdesc_s390x_linux64v2 = result;
+ tdesc_s390x_linux64v2 = result.release ();
}
diff --git a/gdb/features/s390x-te-linux64.c b/gdb/features/s390x-te-linux64.c
index babd3bd..64a0fe5 100644
--- a/gdb/features/s390x-te-linux64.c
+++ b/gdb/features/s390x-te-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_te_linux64;
static void
initialize_tdesc_s390x_te_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_te_linux64 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_te_linux64 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,12 +71,12 @@ initialize_tdesc_s390x_te_linux64 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 54, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 55, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 56, 1, "tdb", 64, "uint64");
@@ -98,5 +98,5 @@ initialize_tdesc_s390x_te_linux64 (void)
tdesc_create_reg (feature, "tr14", 72, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 73, 1, "tdb", 64, "uint64");
- tdesc_s390x_te_linux64 = result;
+ tdesc_s390x_te_linux64 = result.release ();
}
diff --git a/gdb/features/s390x-tevx-linux64.c b/gdb/features/s390x-tevx-linux64.c
index 1ac3249..ec68e70 100644
--- a/gdb/features/s390x-tevx-linux64.c
+++ b/gdb/features/s390x-tevx-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_tevx_linux64;
static void
initialize_tdesc_s390x_tevx_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_tevx_linux64 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_tevx_linux64 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,12 +71,12 @@ initialize_tdesc_s390x_tevx_linux64 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.tdb");
tdesc_create_reg (feature, "tdb0", 54, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tac", 55, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tct", 56, 1, "tdb", 64, "uint64");
@@ -98,7 +98,7 @@ initialize_tdesc_s390x_tevx_linux64 (void)
tdesc_create_reg (feature, "tr14", 72, 1, "tdb", 64, "uint64");
tdesc_create_reg (feature, "tr15", 73, 1, "tdb", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -169,5 +169,5 @@ initialize_tdesc_s390x_tevx_linux64 (void)
tdesc_create_reg (feature, "v30", 104, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 105, 1, NULL, 128, "vec128");
- tdesc_s390x_tevx_linux64 = result;
+ tdesc_s390x_tevx_linux64 = result.release ();
}
diff --git a/gdb/features/s390x-vx-linux64.c b/gdb/features/s390x-vx-linux64.c
index 2e3d382..4362e53 100644
--- a/gdb/features/s390x-vx-linux64.c
+++ b/gdb/features/s390x-vx-linux64.c
@@ -9,12 +9,12 @@ struct target_desc *tdesc_s390x_vx_linux64;
static void
initialize_tdesc_s390x_vx_linux64 (void)
{
- struct target_desc *result = allocate_target_description ();
- set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+ target_desc_up result = allocate_target_description ();
+ set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
struct tdesc_feature *feature;
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
tdesc_create_reg (feature, "pswm", 0, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "pswa", 1, 1, "psw", 64, "uint64");
tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
@@ -34,7 +34,7 @@ initialize_tdesc_s390x_vx_linux64 (void)
tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.acr");
tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
@@ -52,7 +52,7 @@ initialize_tdesc_s390x_vx_linux64 (void)
tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.fpr");
tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
@@ -71,12 +71,12 @@ initialize_tdesc_s390x_vx_linux64 (void)
tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.linux");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.linux");
tdesc_create_reg (feature, "orig_r2", 51, 1, "system", 64, "uint64");
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");
- feature = tdesc_create_feature (result, "org.gnu.gdb.s390.vx");
+ feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.vx");
tdesc_type *element_type;
element_type = tdesc_named_type (feature, "ieee_single");
tdesc_create_vector (feature, "v4f", element_type, 4);
@@ -147,5 +147,5 @@ initialize_tdesc_s390x_vx_linux64 (void)
tdesc_create_reg (feature, "v30", 84, 1, NULL, 128, "vec128");
tdesc_create_reg (feature, "v31", 85, 1, NULL, 128, "vec128");
- tdesc_s390x_vx_linux64 = result;
+ tdesc_s390x_vx_linux64 = result.release ();
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index b4ed734..317c7d0 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8938,10 +8938,10 @@ _initialize_mips_tdep ()
/* Create feature sets with the appropriate properties. The values
are not important. */
- mips_tdesc_gp32 = allocate_target_description ();
+ mips_tdesc_gp32 = allocate_target_description ().release ();
set_tdesc_property (mips_tdesc_gp32, PROPERTY_GP32, "");
- mips_tdesc_gp64 = allocate_target_description ();
+ mips_tdesc_gp64 = allocate_target_description ().release ();
set_tdesc_property (mips_tdesc_gp64, PROPERTY_GP64, "");
/* Add root prefix command for all "set mips"/"show mips" commands. */
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 19dbcbe..6d0905b 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -1207,10 +1207,10 @@ tdesc_create_feature (struct target_desc *tdesc, const char *name)
/* See gdbsupport/tdesc.h. */
-struct target_desc *
+target_desc_up
allocate_target_description (void)
{
- return new target_desc ();
+ return target_desc_up (new target_desc ());
}
/* See gdbsupport/tdesc.h. */
@@ -1377,12 +1377,12 @@ public:
printf_unfiltered ("initialize_tdesc_%s (void)\n", m_function);
printf_unfiltered ("{\n");
printf_unfiltered
- (" struct target_desc *result = allocate_target_description ();\n");
+ (" target_desc_up result = allocate_target_description ();\n");
if (tdesc_architecture (e) != NULL)
{
printf_unfiltered
- (" set_tdesc_architecture (result, bfd_scan_arch (\"%s\"));\n",
+ (" set_tdesc_architecture (result.get (), bfd_scan_arch (\"%s\"));\n",
tdesc_architecture (e)->printable_name);
printf_unfiltered ("\n");
}
@@ -1390,21 +1390,21 @@ public:
&& tdesc_osabi (e) < GDB_OSABI_INVALID)
{
printf_unfiltered
- (" set_tdesc_osabi (result, osabi_from_tdesc_string (\"%s\"));\n",
+ (" set_tdesc_osabi (result.get (), osabi_from_tdesc_string (\"%s\"));\n",
gdbarch_osabi_name (tdesc_osabi (e)));
printf_unfiltered ("\n");
}
for (const tdesc_compatible_info_up &compatible : e->compatible)
printf_unfiltered
- (" tdesc_add_compatible (result, bfd_scan_arch (\"%s\"));\n",
+ (" tdesc_add_compatible (result.get (), bfd_scan_arch (\"%s\"));\n",
compatible->arch ()->printable_name);
if (!e->compatible.empty ())
printf_unfiltered ("\n");
for (const property &prop : e->properties)
- printf_unfiltered (" set_tdesc_property (result, \"%s\", \"%s\");\n",
+ printf_unfiltered (" set_tdesc_property (result.get (), \"%s\", \"%s\");\n",
prop.key.c_str (), prop.value.c_str ());
printf_unfiltered (" struct tdesc_feature *feature;\n");
@@ -1412,7 +1412,7 @@ public:
void visit_pre (const tdesc_feature *e) override
{
- printf_unfiltered ("\n feature = tdesc_create_feature (result, \"%s\");\n",
+ printf_unfiltered ("\n feature = tdesc_create_feature (result.get (), \"%s\");\n",
e->name.c_str ());
}
@@ -1421,7 +1421,7 @@ public:
void visit_post (const target_desc *e) override
{
- printf_unfiltered ("\n tdesc_%s = result;\n", m_function);
+ printf_unfiltered ("\n tdesc_%s = result.release ();\n", m_function);
printf_unfiltered ("}\n");
}