]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdbserver] Use const_target_desc_up for regformat tdescs
authorKeith Seitz <keiths@redhat.com>
Tue, 7 Jul 2026 19:10:08 +0000 (12:10 -0700)
committerKeith Seitz <keiths@redhat.com>
Tue, 7 Jul 2026 19:11:09 +0000 (12:11 -0700)
Regformat tdescs are now declared 'const_target_desc_up' by
gdb's regdat.sh, so update the various gdbserver target descriptions
to observe this API change.

There should be no user visible changes.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdbserver/linux-ia64-low.cc
gdbserver/linux-m68k-low.cc
gdbserver/linux-microblaze-low.cc
gdbserver/linux-mips-low.cc
gdbserver/linux-or1k-low.cc
gdbserver/linux-s390-ipa.cc
gdbserver/linux-s390-low.cc
gdbserver/linux-s390-tdesc.h
gdbserver/linux-sh-low.cc
gdbserver/linux-sparc-low.cc
gdbserver/linux-xtensa-low.cc

index 337ef08257b1b8bc21fe6f9322bef74114b7d04d..2a749f5a5edbf1838bde5d76cb567fbee7526058 100644 (file)
@@ -17,6 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "linux-low.h"
+#include "tdesc.h"
 
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
@@ -65,7 +66,7 @@ ia64_target::low_breakpoint_at (CORE_ADDR pc)
 
 /* Defined in auto-generated file reg-ia64.c.  */
 void init_registers_ia64 (void);
-extern const struct target_desc *tdesc_ia64;
+extern const_target_desc_up tdesc_ia64;
 
 #define ia64_num_regs 462
 
@@ -381,7 +382,7 @@ ia64_target::get_regs_info ()
 void
 ia64_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_ia64;
+  current_process ()->tdesc = tdesc_ia64.get ();
 }
 
 /* The linux target ops object.  */
index f620a344a0a02dd27ec41263cb4b199daf52fd05..df1d73469317ad526a8890451926386de1553a57 100644 (file)
@@ -17,6 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "linux-low.h"
+#include "tdesc.h"
 
 /* Linux target op definitions for the m68k architecture.  */
 
@@ -77,7 +78,7 @@ m68k_target::low_decr_pc_after_break ()
 
 /* Defined in auto-generated file reg-m68k.c.  */
 void init_registers_m68k (void);
-extern const struct target_desc *tdesc_m68k;
+extern const_target_desc_up tdesc_m68k;
 
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
@@ -252,7 +253,7 @@ m68k_target::get_regs_info ()
 void
 m68k_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_m68k;
+  current_process ()->tdesc = tdesc_m68k.get ();
 }
 
 /* The linux target ops object.  */
index 21793d9a80199f8092b3e4be5203b3bf790dbaaa..19c8751a0a93670a4ae8edee1bb001dbf405218a 100644 (file)
@@ -28,7 +28,7 @@
 #include <sys/ptrace.h>
 
 #include "gdb_proc_service.h"
-
+#include "tdesc.h"
 
 static int microblaze_regmap[] =
  {PT_GPR(0),     PT_GPR(1),     PT_GPR(2),     PT_GPR(3),
@@ -79,7 +79,7 @@ constexpr auto microblaze_num_regs
 
 /* Defined in auto-generated file microblaze-linux-generated.c.  */
 void init_registers_microblaze_linux ();
-extern const target_desc *tdesc_microblaze_linux;
+extern const_target_desc_up tdesc_microblaze_linux;
 
 bool
 microblaze_target::low_supports_breakpoints ()
@@ -229,7 +229,7 @@ microblaze_target::get_regs_info ()
 void
 microblaze_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_microblaze_linux;
+  current_process ()->tdesc = tdesc_microblaze_linux.get ();
 }
 
 linux_process_target *the_linux_target = &the_microblaze_target;
index 746887027b5cb82f35939a296d83592ffe02962c..a156085a557cf1d66a368b24664e5af5576ccc5a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "nat/mips-linux-watch.h"
 #include "gdb_proc_service.h"
+#include "tdesc.h"
 
 /* Linux target op definitions for the MIPS architecture.  */
 
@@ -89,19 +90,19 @@ static mips_target the_mips_target;
 
 /* Defined in auto-generated file mips-linux.c.  */
 void init_registers_mips_linux (void);
-extern const struct target_desc *tdesc_mips_linux;
+extern const_target_desc_up tdesc_mips_linux;
 
 /* Defined in auto-generated file mips-dsp-linux.c.  */
 void init_registers_mips_dsp_linux (void);
-extern const struct target_desc *tdesc_mips_dsp_linux;
+extern const_target_desc_up tdesc_mips_dsp_linux;
 
 /* Defined in auto-generated file mips64-linux.c.  */
 void init_registers_mips64_linux (void);
-extern const struct target_desc *tdesc_mips64_linux;
+extern const_target_desc_up tdesc_mips64_linux;
 
 /* Defined in auto-generated file mips64-dsp-linux.c.  */
 void init_registers_mips64_dsp_linux (void);
-extern const struct target_desc *tdesc_mips64_dsp_linux;
+extern const_target_desc_up tdesc_mips64_dsp_linux;
 
 #ifdef __mips64
 #define tdesc_mips_linux tdesc_mips64_linux
@@ -206,7 +207,7 @@ mips_read_description (void)
        }
     }
 
-  return have_dsp ? tdesc_mips_dsp_linux : tdesc_mips_linux;
+  return have_dsp ? tdesc_mips_dsp_linux.get () : tdesc_mips_linux.get ();
 }
 
 void
index 59d2bf7435f8c542b38d9939c2be0a3cf9304a07..a8d03d86c120176ea532cfaf232e65ab3617449a 100644 (file)
@@ -21,6 +21,7 @@
 #include "nat/gdb_ptrace.h"
 #include <endian.h>
 #include "gdb_proc_service.h"
+#include "tdesc.h"
 #include <asm/ptrace.h>
 
 #ifndef PTRACE_GET_THREAD_AREA
@@ -86,7 +87,7 @@ or1k_target::low_set_pc (regcache *regcache, CORE_ADDR pc)
 /* Defined in auto-generated file or1k-linux.c.  */
 
 void init_registers_or1k_linux (void);
-extern const struct target_desc *tdesc_or1k_linux;
+extern const_target_desc_up tdesc_or1k_linux;
 
 /* This union is used to convert between int and byte buffer
    representations of register contents.  */
@@ -114,7 +115,7 @@ static int or1k_regmap[] = {
 void
 or1k_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_or1k_linux;
+  current_process ()->tdesc = tdesc_or1k_linux.get ();
 }
 
 /* Implement the low_cannot_fetch_register linux target ops method.  */
index 548107f98191d122f96d05a3fe2957bb598fbe6f..c4e0e90db1beee97d7889da737c653696f6b8b70 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <sys/mman.h>
 #include "tracepoint.h"
+#include "tdesc.h"
 #include "linux-s390-tdesc.h"
 #include <elf.h>
 #ifdef HAVE_GETAUXVAL
@@ -319,63 +320,63 @@ get_ipa_tdesc (int idx)
     case S390_TDESC_64:
       /* Subtract number of VX regs.  */
       SET_REGMAP(s390x_ft_collect_regmap, 32);
-      return tdesc_s390x_linux64;
+      return tdesc_s390x_linux64.get ();
     case S390_TDESC_64V1:
       SET_REGMAP(s390x_ft_collect_regmap, 32);
-      return tdesc_s390x_linux64v1;
+      return tdesc_s390x_linux64v1.get ();
     case S390_TDESC_64V2:
       SET_REGMAP(s390x_ft_collect_regmap, 32);
-      return tdesc_s390x_linux64v2;
+      return tdesc_s390x_linux64v2.get ();
     case S390_TDESC_TE:
       SET_REGMAP(s390x_te_ft_collect_regmap, 32);
-      return tdesc_s390x_te_linux64;
+      return tdesc_s390x_te_linux64.get ();
     case S390_TDESC_VX:
       SET_REGMAP(s390x_ft_collect_regmap, 0);
-      return tdesc_s390x_vx_linux64;
+      return tdesc_s390x_vx_linux64.get ();
     case S390_TDESC_TEVX:
       SET_REGMAP(s390x_te_ft_collect_regmap, 0);
-      return tdesc_s390x_tevx_linux64;
+      return tdesc_s390x_tevx_linux64.get ();
     case S390_TDESC_GS:
       SET_REGMAP(s390x_te_ft_collect_regmap, 0);
-      return tdesc_s390x_gs_linux64;
+      return tdesc_s390x_gs_linux64.get ();
 #else
     case S390_TDESC_32:
       SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
-      return tdesc_s390_linux32;
+      return tdesc_s390_linux32.get ();
     case S390_TDESC_32V1:
       SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
-      return tdesc_s390_linux32v1;
+      return tdesc_s390_linux32v1.get ();
     case S390_TDESC_32V2:
       SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
-      return tdesc_s390_linux32v2;
+      return tdesc_s390_linux32v2.get ();
     case S390_TDESC_64:
       SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
-      return tdesc_s390_linux64;
+      return tdesc_s390_linux64.get ();
     case S390_TDESC_64V1:
       SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
-      return tdesc_s390_linux64v1;
+      return tdesc_s390_linux64v1.get ();
     case S390_TDESC_64V2:
       SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
-      return tdesc_s390_linux64v2;
+      return tdesc_s390_linux64v2.get ();
     case S390_TDESC_TE:
       SET_REGMAP(s390_te_linux64_ft_collect_regmap, 32);
-      return tdesc_s390_te_linux64;
+      return tdesc_s390_te_linux64.get ();
     case S390_TDESC_VX:
       SET_REGMAP(s390_linux64_ft_collect_regmap, 0);
-      return tdesc_s390_vx_linux64;
+      return tdesc_s390_vx_linux64.get ();
     case S390_TDESC_TEVX:
       SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0);
-      return tdesc_s390_tevx_linux64;
+      return tdesc_s390_tevx_linux64.get ();
     case S390_TDESC_GS:
       SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0);
-      return tdesc_s390_gs_linux64;
+      return tdesc_s390_gs_linux64.get ();
 #endif
     default:
       internal_error ("unknown ipa tdesc index: %d", idx);
 #ifdef __s390x__
-      return tdesc_s390x_linux64;
+      return tdesc_s390x_linux64.get ();
 #else
-      return tdesc_s390_linux32;
+      return tdesc_s390_linux32.get ();
 #endif
     }
 }
index 8a4567837bdb15d7cb03d2924ed0226e441ecfe8..4bb761de1bd250bc6fa167d4168d6b084b605419 100644 (file)
@@ -30,6 +30,7 @@
 #include <elf.h>
 #include <inttypes.h>
 
+#include "tdesc.h"
 #include "linux-s390-tdesc.h"
 
 #ifndef HWCAP_S390_HIGH_GPRS
@@ -615,18 +616,18 @@ s390_target::low_arch_setup ()
     if (wordsize == 8)
       {
        if (have_regset_gs)
-         tdesc = tdesc_s390x_gs_linux64;
+         tdesc = tdesc_s390x_gs_linux64.get ();
        else if (have_regset_vxrs)
-         tdesc = (have_regset_tdb ? tdesc_s390x_tevx_linux64 :
-                  tdesc_s390x_vx_linux64);
+         tdesc = (have_regset_tdb ? tdesc_s390x_tevx_linux64.get () :
+                  tdesc_s390x_vx_linux64.get ());
        else if (have_regset_tdb)
-         tdesc = tdesc_s390x_te_linux64;
+         tdesc = tdesc_s390x_te_linux64.get ();
        else if (have_regset_system_call)
-         tdesc = tdesc_s390x_linux64v2;
+         tdesc = tdesc_s390x_linux64v2.get ();
        else if (have_regset_last_break)
-         tdesc = tdesc_s390x_linux64v1;
+         tdesc = tdesc_s390x_linux64v1.get ();
        else
-         tdesc = tdesc_s390x_linux64;
+         tdesc = tdesc_s390x_linux64.get ();
       }
 
     /* For a 31-bit inferior, check whether the kernel supports
@@ -637,28 +638,28 @@ s390_target::low_arch_setup ()
       {
        have_hwcap_s390_high_gprs = 1;
        if (have_regset_gs)
-         tdesc = tdesc_s390_gs_linux64;
+         tdesc = tdesc_s390_gs_linux64.get ();
        else if (have_regset_vxrs)
-         tdesc = (have_regset_tdb ? tdesc_s390_tevx_linux64 :
-                  tdesc_s390_vx_linux64);
+         tdesc = (have_regset_tdb ? tdesc_s390_tevx_linux64.get () :
+                  tdesc_s390_vx_linux64.get ());
        else if (have_regset_tdb)
-         tdesc = tdesc_s390_te_linux64;
+         tdesc = tdesc_s390_te_linux64.get ();
        else if (have_regset_system_call)
-         tdesc = tdesc_s390_linux64v2;
+         tdesc = tdesc_s390_linux64v2.get ();
        else if (have_regset_last_break)
-         tdesc = tdesc_s390_linux64v1;
+         tdesc = tdesc_s390_linux64v1.get ();
        else
-         tdesc = tdesc_s390_linux64;
+         tdesc = tdesc_s390_linux64.get ();
       }
     else
       {
        /* Assume 31-bit inferior process.  */
        if (have_regset_system_call)
-         tdesc = tdesc_s390_linux32v2;
+         tdesc = tdesc_s390_linux32v2.get ();
        else if (have_regset_last_break)
-         tdesc = tdesc_s390_linux32v1;
+         tdesc = tdesc_s390_linux32v1.get ();
        else
-         tdesc = tdesc_s390_linux32;
+         tdesc = tdesc_s390_linux32.get ();
       }
 
     have_hwcap_s390_vx = have_regset_vxrs;
@@ -1451,41 +1452,41 @@ s390_target::get_ipa_tdesc_idx ()
   const target_desc *tdesc = current_process ()->tdesc;
 
 #ifdef __s390x__
-  if (tdesc == tdesc_s390x_linux64)
+  if (tdesc == tdesc_s390x_linux64.get ())
     return S390_TDESC_64;
-  if (tdesc == tdesc_s390x_linux64v1)
+  if (tdesc == tdesc_s390x_linux64v1.get ())
     return S390_TDESC_64V1;
-  if (tdesc == tdesc_s390x_linux64v2)
+  if (tdesc == tdesc_s390x_linux64v2.get ())
     return S390_TDESC_64V2;
-  if (tdesc == tdesc_s390x_te_linux64)
+  if (tdesc == tdesc_s390x_te_linux64.get ())
     return S390_TDESC_TE;
-  if (tdesc == tdesc_s390x_vx_linux64)
+  if (tdesc == tdesc_s390x_vx_linux64.get ())
     return S390_TDESC_VX;
-  if (tdesc == tdesc_s390x_tevx_linux64)
+  if (tdesc == tdesc_s390x_tevx_linux64.get ())
     return S390_TDESC_TEVX;
-  if (tdesc == tdesc_s390x_gs_linux64)
+  if (tdesc == tdesc_s390x_gs_linux64.get ())
     return S390_TDESC_GS;
 #endif
 
-  if (tdesc == tdesc_s390_linux32)
+  if (tdesc == tdesc_s390_linux32.get ())
     return S390_TDESC_32;
-  if (tdesc == tdesc_s390_linux32v1)
+  if (tdesc == tdesc_s390_linux32v1.get ())
     return S390_TDESC_32V1;
-  if (tdesc == tdesc_s390_linux32v2)
+  if (tdesc == tdesc_s390_linux32v2.get ())
     return S390_TDESC_32V2;
-  if (tdesc == tdesc_s390_linux64)
+  if (tdesc == tdesc_s390_linux64.get ())
     return S390_TDESC_64;
-  if (tdesc == tdesc_s390_linux64v1)
+  if (tdesc == tdesc_s390_linux64v1.get ())
     return S390_TDESC_64V1;
-  if (tdesc == tdesc_s390_linux64v2)
+  if (tdesc == tdesc_s390_linux64v2.get ())
     return S390_TDESC_64V2;
-  if (tdesc == tdesc_s390_te_linux64)
+  if (tdesc == tdesc_s390_te_linux64.get ())
     return S390_TDESC_TE;
-  if (tdesc == tdesc_s390_vx_linux64)
+  if (tdesc == tdesc_s390_vx_linux64.get ())
     return S390_TDESC_VX;
-  if (tdesc == tdesc_s390_tevx_linux64)
+  if (tdesc == tdesc_s390_tevx_linux64.get ())
     return S390_TDESC_TEVX;
-  if (tdesc == tdesc_s390_gs_linux64)
+  if (tdesc == tdesc_s390_gs_linux64.get ())
     return S390_TDESC_GS;
 
   return 0;
index b4d63430df5569ca8fc813341af731585b438e24..3c53a717f6bb8de7f8469e53ee51367c1f9d7d08 100644 (file)
@@ -41,31 +41,31 @@ enum s390_linux_tdesc {
 
 /* Defined in auto-generated file s390x-linux64.c.  */
 void init_registers_s390x_linux64 (void);
-extern const struct target_desc *tdesc_s390x_linux64;
+extern const_target_desc_up tdesc_s390x_linux64;
 
 /* Defined in auto-generated file s390x-linux64v1.c.  */
 void init_registers_s390x_linux64v1 (void);
-extern const struct target_desc *tdesc_s390x_linux64v1;
+extern const_target_desc_up tdesc_s390x_linux64v1;
 
 /* Defined in auto-generated file s390x-linux64v2.c.  */
 void init_registers_s390x_linux64v2 (void);
-extern const struct target_desc *tdesc_s390x_linux64v2;
+extern const_target_desc_up tdesc_s390x_linux64v2;
 
 /* Defined in auto-generated file s390x-te-linux64.c.  */
 void init_registers_s390x_te_linux64 (void);
-extern const struct target_desc *tdesc_s390x_te_linux64;
+extern const_target_desc_up tdesc_s390x_te_linux64;
 
 /* Defined in auto-generated file s390x-vx-linux64.c.  */
 void init_registers_s390x_vx_linux64 (void);
-extern const struct target_desc *tdesc_s390x_vx_linux64;
+extern const_target_desc_up tdesc_s390x_vx_linux64;
 
 /* Defined in auto-generated file s390x-tevx-linux64.c.  */
 void init_registers_s390x_tevx_linux64 (void);
-extern const struct target_desc *tdesc_s390x_tevx_linux64;
+extern const_target_desc_up tdesc_s390x_tevx_linux64;
 
 /* Defined in auto-generated file s390x-gs-linux64.c.  */
 void init_registers_s390x_gs_linux64 (void);
-extern const struct target_desc *tdesc_s390x_gs_linux64;
+extern const_target_desc_up tdesc_s390x_gs_linux64;
 
 #endif
 
@@ -73,43 +73,43 @@ extern const struct target_desc *tdesc_s390x_gs_linux64;
 
 /* Defined in auto-generated file s390-linux32.c.  */
 void init_registers_s390_linux32 (void);
-extern const struct target_desc *tdesc_s390_linux32;
+extern const_target_desc_up tdesc_s390_linux32;
 
 /* Defined in auto-generated file s390-linux32v1.c.  */
 void init_registers_s390_linux32v1 (void);
-extern const struct target_desc *tdesc_s390_linux32v1;
+extern const_target_desc_up tdesc_s390_linux32v1;
 
 /* Defined in auto-generated file s390-linux32v2.c.  */
 void init_registers_s390_linux32v2 (void);
-extern const struct target_desc *tdesc_s390_linux32v2;
+extern const_target_desc_up tdesc_s390_linux32v2;
 
 /* Defined in auto-generated file s390-linux64.c.  */
 void init_registers_s390_linux64 (void);
-extern const struct target_desc *tdesc_s390_linux64;
+extern const_target_desc_up tdesc_s390_linux64;
 
 /* Defined in auto-generated file s390-linux64v1.c.  */
 void init_registers_s390_linux64v1 (void);
-extern const struct target_desc *tdesc_s390_linux64v1;
+extern const_target_desc_up tdesc_s390_linux64v1;
 
 /* Defined in auto-generated file s390-linux64v2.c.  */
 void init_registers_s390_linux64v2 (void);
-extern const struct target_desc *tdesc_s390_linux64v2;
+extern const_target_desc_up tdesc_s390_linux64v2;
 
 /* Defined in auto-generated file s390-te-linux64.c.  */
 void init_registers_s390_te_linux64 (void);
-extern const struct target_desc *tdesc_s390_te_linux64;
+extern const_target_desc_up tdesc_s390_te_linux64;
 
 /* Defined in auto-generated file s390-vx-linux64.c.  */
 void init_registers_s390_vx_linux64 (void);
-extern const struct target_desc *tdesc_s390_vx_linux64;
+extern const_target_desc_up tdesc_s390_vx_linux64;
 
 /* Defined in auto-generated file s390-tevx-linux64.c.  */
 void init_registers_s390_tevx_linux64 (void);
-extern const struct target_desc *tdesc_s390_tevx_linux64;
+extern const_target_desc_up tdesc_s390_tevx_linux64;
 
 /* Defined in auto-generated file s390-gs-linux64.c.  */
 void init_registers_s390_gs_linux64 (void);
-extern const struct target_desc *tdesc_s390_gs_linux64;
+extern const_target_desc_up tdesc_s390_gs_linux64;
 
 #endif
 
index 6370c18c6773d0fb0890eb6c8ab0a250ecd70e06..a71a3a9c74272ef2dfd24b98c3baaf3c7359f720 100644 (file)
@@ -17,6 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "linux-low.h"
+#include "tdesc.h"
 
 /* Linux target op definitions for the SH architecture.  */
 
@@ -69,7 +70,7 @@ sh_target::low_set_pc (regcache *regcache, CORE_ADDR pc)
 
 /* Defined in auto-generated file reg-sh.c.  */
 void init_registers_sh (void);
-extern const struct target_desc *tdesc_sh;
+extern const_target_desc_up tdesc_sh;
 
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
@@ -179,7 +180,7 @@ sh_target::get_regs_info ()
 void
 sh_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_sh;
+  current_process ()->tdesc = tdesc_sh.get ();
 }
 
 /* The linux target ops object.  */
index 77edfbdde2a13da3091cc7c0c31a045c52e030b2..10926a939916b411357ccc8d3c5d22f24e985523 100644 (file)
@@ -21,6 +21,7 @@
 #include "nat/gdb_ptrace.h"
 
 #include "gdb_proc_service.h"
+#include "tdesc.h"
 
 /* The stack pointer is offset from the stack frame by a BIAS of 2047
    (0x7ff) for 64-bit code.  BIAS is likely to be defined on SPARC
@@ -142,7 +143,7 @@ static const struct regs_range_t fpregs_ranges[] = {
 
 /* Defined in auto-generated file reg-sparc64.c.  */
 void init_registers_sparc64 (void);
-extern const struct target_desc *tdesc_sparc64;
+extern const_target_desc_up tdesc_sparc64;
 
 bool
 sparc_target::low_cannot_store_register (int regno)
@@ -298,7 +299,7 @@ sparc_target::low_breakpoint_at (CORE_ADDR where)
 void
 sparc_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_sparc64;
+  current_process ()->tdesc = tdesc_sparc64.get ();
 }
 
 static struct regset_info sparc_regsets[] = {
index 3af9bc44fb1c60d4266bc66c5f94bb53753e94a2..f06905645cfac1e0e509be2af4b1f6c5a398f9b8 100644 (file)
@@ -18,6 +18,7 @@
 
 
 #include "linux-low.h"
+#include "tdesc.h"
 
 /* Linux target op definitions for the Xtensa architecture.  */
 
@@ -84,7 +85,7 @@ xtensa_target::low_set_pc (regcache *regcache, CORE_ADDR pc)
 
 /* Defined in auto-generated file reg-xtensa.c.  */
 void init_registers_xtensa (void);
-extern const struct target_desc *tdesc_xtensa;
+extern const_target_desc_up tdesc_xtensa;
 
 #include <asm/ptrace.h>
 #include <xtensa-config.h>
@@ -310,7 +311,7 @@ static struct regs_info myregs_info =
 void
 xtensa_target::low_arch_setup ()
 {
-  current_process ()->tdesc = tdesc_xtensa;
+  current_process ()->tdesc = tdesc_xtensa.get ();
 }
 
 const regs_info *