Convert "typedef struct foo { ... } bar" to "using bar = struct foo { ...}".
Generated by a script written by Claude Code.
Approved-By: Tom Tromey <tom@tromey.com>
any side-effects. This means that the smob needs to store everything
that was passed to make-breakpoint. */
-typedef struct gdbscm_breakpoint_object
+using breakpoint_smob = struct gdbscm_breakpoint_object
{
/* This always appears first. */
gdb_smob base;
/* A stop condition or #f. */
SCM stop;
-} breakpoint_smob;
+};
static const char breakpoint_smob_name[] = "gdb:breakpoint";
int tv_usec;
};
-typedef union compat_sigval
+using compat_sigval_t = union compat_sigval
{
compat_int_t sival_int;
compat_uptr_t sival_ptr;
-} compat_sigval_t;
+};
-typedef struct compat_siginfo
+using compat_siginfo_t = struct compat_siginfo
{
int si_signo;
int si_errno;
int _fd;
} _sigpoll;
} _sifields;
-} compat_siginfo_t;
+};
#define cpt_si_pid _sifields._kill._pid
#define cpt_si_uid _sifields._kill._uid
using td_thragent_t = struct td_thragent;
/* The actual thread handle type. This is also opaque. */
-typedef struct td_thrhandle
+using td_thrhandle_t = struct td_thrhandle
{
td_thragent_t *th_ta_p;
psaddr_t th_unique;
-} td_thrhandle_t;
+};
/* Forward declaration of a type defined by and for the dynamic linker. */
#define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index */
/* Bitmask of enabled events. */
-typedef struct td_thr_events
+using td_thr_events_t = struct td_thr_events
{
uint32_t event_bits[TD_EVENTSIZE];
-} td_thr_events_t;
+};
/* Event set manipulation macros. */
#define __td_eventmask(n) \
};
/* Description how event type is reported. */
-typedef struct td_notify
+using td_notify_t = struct td_notify
{
td_notify_e type; /* Way the event is reported. */
union
psaddr_t bptaddr; /* Address of breakpoint. */
int syscallno; /* Number of system call used. */
} u;
-} td_notify_t;
+};
/* Structure used to report event. */
-typedef struct td_event_msg
+using td_event_msg_t = struct td_event_msg
{
td_event_e event; /* Event type being reported. */
const td_thrhandle_t *th_p; /* Thread reporting the event. */
#endif
uintptr_t data; /* Event specific data. */
} msg;
-} td_event_msg_t;
+};
/* Structure containing event data available in each thread structure. */
struct td_eventbuf_t
/* Gathered statistics about the process. */
-typedef struct td_ta_stats
+using td_ta_stats_t = struct td_ta_stats
{
int nthreads; /* Total number of threads in use. */
int r_concurrency; /* Concurrency level requested by user. */
numerator. */
int nidle_den; /* Average number of idling processes,
denominator. */
-} td_ta_stats_t;
+};
/* Since Sun's library is based on Solaris threads we have to define a few
/* Information about the thread. */
-typedef struct td_thrinfo
+using td_thrinfo_t = struct td_thrinfo
{
td_thragent_t *ti_ta_p; /* Process handle. */
unsigned int ti_user_flags; /* Unused. */
unsigned char ti_pirecflag; /* Unused. */
sigset_t ti_pending; /* Set of pending signals. */
td_thr_events_t ti_events; /* Set of enabled events. */
-} td_thrinfo_t;
+};
struct cmd_list_element *info_w32_cmdlist;
-typedef struct thread_information_block_32
+using thread_information_32 = struct thread_information_block_32
{
uint32_t current_seh; /* %fs:0x0000 */
uint32_t current_top_of_stack; /* %fs:0x0004 */
uint32_t thread_local_storage; /* %fs:0x002c */
uint32_t process_environment_block; /* %fs:0x0030 */
uint32_t last_error_number; /* %fs:0x0034 */
- }
-thread_information_32;
+ };
-typedef struct thread_information_block_64
+using thread_information_64 = struct thread_information_block_64
{
uint64_t current_seh; /* %gs:0x0000 */
uint64_t current_top_of_stack; /* %gs:0x0008 */
uint64_t thread_local_storage; /* %gs:0x0058 */
uint64_t process_environment_block; /* %gs:0x0060 */
uint64_t last_error_number; /* %gs:0x0068 */
- }
-thread_information_64;
+ };
static const char* TIB_NAME[] =
#define XTENSA_NUM_SAVED_AREGS 12
/* Frame cache part for Windowed ABI. */
-typedef struct xtensa_windowed_frame_cache
+using xtensa_windowed_frame_cache_t = struct xtensa_windowed_frame_cache
{
int wb; /* WINDOWBASE of the previous frame. */
int callsize; /* Call size of this frame. */
/* Addresses of spilled A-registers.
AREGS[i] == -1, if corresponding AR is alive. */
CORE_ADDR aregs[XTENSA_NUM_SAVED_AREGS];
-} xtensa_windowed_frame_cache_t;
+};
/* Call0 ABI Definitions. */
extern xtensa_isa xtensa_default_isa;
-typedef struct xtensa_c0reg
+using xtensa_c0reg_t = struct xtensa_c0reg
{
int fr_reg; /* original register from which register content
is derived, or C0_CONST, or C0_INEXP. */
int fr_ofs; /* constant offset from reg, or immediate value. */
int to_stk; /* offset from original SP to register (4-byte aligned),
or C0_NOSTK if register has not been saved. */
-} xtensa_c0reg_t;
+};
/* Frame cache part for Call0 ABI. */
-typedef struct xtensa_call0_frame_cache
+using xtensa_call0_frame_cache_t = struct xtensa_call0_frame_cache
{
int c0_frmsz; /* Stack frame size. */
int c0_hasfp; /* Current frame uses frame pointer. */
stack offset. C0_NOSTK otherwise. */
xtensa_c0reg_t c0_rt[C0_NREGS]; /* Register tracking information. */
-} xtensa_call0_frame_cache_t;
+};
-typedef struct xtensa_frame_cache
+using xtensa_frame_cache_t = struct xtensa_frame_cache
{
CORE_ADDR base; /* Stack pointer of this frame. */
CORE_ADDR pc; /* PC of this frame at the function entry point. */
xtensa_windowed_frame_cache_t wd; /* call0 == false. */
xtensa_call0_frame_cache_t c0; /* call0 == true. */
};
-} xtensa_frame_cache_t;
+};
static struct xtensa_frame_cache *