+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.
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");
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");
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");
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;
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)
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");
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");
/* 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";
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;
}
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 */
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");
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");
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 ();
}
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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 ();
}
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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);
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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);
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");
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 ();
}
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");
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");
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 ();
}
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");
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 ();
}
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");
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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 ();
}
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");
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");
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");
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");
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);
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 ();
}
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");
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");
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");
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);
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 ();
}
/* 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. */
/* 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. */
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");
}
&& 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");
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 ());
}
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");
}
+2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * 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.
+
2020-10-07 Tom Tromey <tromey@adacore.com>
* server.cc (handle_search_memory): Remove dead code.
struct process_info *child_proc;
struct lwp_info *child_lwp;
struct thread_info *child_thr;
- struct target_desc *tdesc;
ptid = ptid_t (new_pid, new_pid, 0);
clone_all_breakpoints (child_thr, event_thr);
- tdesc = allocate_target_description ();
- copy_target_description (tdesc, parent_proc->tdesc);
- child_proc->tdesc = tdesc;
+ target_desc_up tdesc = allocate_target_description ();
+ copy_target_description (tdesc.get (), parent_proc->tdesc);
+ child_proc->tdesc = tdesc.release ();
/* Clone arch-specific process data. */
low_new_fork (parent_proc, child_proc);
const riscv_gdbarch_features features
= riscv_linux_read_features (lwpid_of (current_thread));
- target_desc *tdesc = riscv_create_target_description (features);
+ target_desc_up tdesc = riscv_create_target_description (features);
if (!tdesc->expedite_regs)
- init_target_desc (tdesc, expedite_regs);
- current_process ()->tdesc = tdesc;
+ init_target_desc (tdesc.get (), expedite_regs);
+ current_process ()->tdesc = tdesc.release ();
}
/* Collect GPRs from REGCACHE into BUF. */
#include "linux-x86-tdesc.h"
#ifdef __x86_64__
-static struct target_desc *tdesc_amd64_linux_no_xml;
+static target_desc_up tdesc_amd64_linux_no_xml;
#endif
-static struct target_desc *tdesc_i386_linux_no_xml;
+static target_desc_up tdesc_i386_linux_no_xml;
static unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 };
/* Don't use XML. */
#ifdef __x86_64__
if (machine == EM_X86_64)
- return tdesc_amd64_linux_no_xml;
+ return tdesc_amd64_linux_no_xml.get ();
else
#endif
- return tdesc_i386_linux_no_xml;
+ return tdesc_i386_linux_no_xml.get ();
}
if (have_ptrace_getregset == -1)
return amd64_get_ipa_tdesc_idx (tdesc);
#endif
- if (tdesc == tdesc_i386_linux_no_xml)
+ if (tdesc == tdesc_i386_linux_no_xml.get ())
return X86_TDESC_SSE;
return i386_get_ipa_tdesc_idx (tdesc);
/* Initialize the Linux target descriptions. */
#ifdef __x86_64__
tdesc_amd64_linux_no_xml = allocate_target_description ();
- copy_target_description (tdesc_amd64_linux_no_xml,
+ copy_target_description (tdesc_amd64_linux_no_xml.get (),
amd64_linux_read_description (X86_XSTATE_SSE_MASK,
false));
tdesc_amd64_linux_no_xml->xmltarget = xmltarget_amd64_linux_no_xml;
#endif
tdesc_i386_linux_no_xml = allocate_target_description ();
- copy_target_description (tdesc_i386_linux_no_xml,
+ copy_target_description (tdesc_i386_linux_no_xml.get (),
i386_linux_read_description (X86_XSTATE_SSE_MASK));
tdesc_i386_linux_no_xml->xmltarget = xmltarget_i386_linux_no_xml;
/* 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. */
+2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * tdesc.h (allocate_target_description): Update return type.
+
2020-10-07 Tom Tromey <tromey@adacore.com>
* Makefile.in: Rebuild.
typedef std::unique_ptr<target_desc, target_desc_deleter> target_desc_up;
/* Allocate a new target_desc. */
-target_desc *allocate_target_description (void);
+target_desc_up allocate_target_description (void);
/* Set TARGET_DESC's architecture by NAME. */
void set_tdesc_architecture (target_desc *target_desc,