[binutils-gdb] [gdb] Convert function pointer typedefs to using
Tom de Vries via Gdb-cvs <[email protected]> Mon, 13 Jul 2026 13:07:03 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D771730187399= 0655aa2472aafba953a3da8f648a commit 7717301873990655aa2472aafba953a3da8f648a Author: Tom de Vries <[email protected]> Date: Mon Jul 13 15:06:35 2026 +0200 [gdb] Convert function pointer typedefs to using =20 Transform "typedef void (*foo) ()" into "using foo =3D void (*) ()". =20 Generated by a script written by Claude Code. =20 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/dwarf2/frame.h | 4 ++-- gdb/infrun.c | 4 ++-- gdb/rs6000-tdep.c | 4 ++-- gdb/target-descriptions.h | 6 +++--- gdbserver/tracepoint.cc | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/dwarf2/frame.h b/gdb/dwarf2/frame.h index d3c71c3d16e..6462d008cc2 100644 --- a/gdb/dwarf2/frame.h +++ b/gdb/dwarf2/frame.h @@ -66,8 +66,8 @@ enum dwarf2_frame_reg_rule =20 /* Register state. */ =20 -typedef struct value *(*fn_prev_register) (const frame_info_ptr &this_fram= e, - void **this_cache, int regnum); +using fn_prev_register =3D struct value *(*) (const frame_info_ptr &this_f= rame, + void **this_cache, int regnum); =20 struct dwarf2_frame_state_reg { diff --git a/gdb/infrun.c b/gdb/infrun.c index f51d301cf39..7b5fd932ea5 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3984,8 +3984,8 @@ delete_thread_infrun_breakpoints (struct thread_info = *tp) just stopped. In all-stop, that's all the non-exited threads; in non-stop, that's the current thread, only. */ =20 -typedef void (*for_each_just_stopped_thread_callback_func) - (struct thread_info *tp); +using for_each_just_stopped_thread_callback_func + =3D void (*) (struct thread_info *tp); =20 static void for_each_just_stopped_thread (for_each_just_stopped_thread_callback_func f= unc) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index f964889a49f..c8ad05c45a4 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2769,8 +2769,8 @@ rs6000_value_from_register (gdbarch *gdbarch, type *t= ype, int regnum, =20 /* The type of a function that moves the value of REG between CACHE or BUF --- in either direction. */ -typedef enum register_status (*move_ev_register_func) (struct regcache *, - int, void *); +using move_ev_register_func =3D enum register_status (*) (struct regcache = *, + int, void *); =20 /* Move SPE vector register values between a 64-bit buffer and the two 32-bit raw register halves in a regcache. This function handles diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h index 25dbf393c2d..39b56d80e5f 100644 --- a/gdb/target-descriptions.h +++ b/gdb/target-descriptions.h @@ -80,9 +80,9 @@ void set_tdesc_pseudo_register_reggroup_p appear in the target description. This means all unknown registers within a single feature will be called one after another. */ =20 -typedef int (*tdesc_unknown_register_ftype) - (struct gdbarch *gdbarch, tdesc_feature *feature, - const char *reg_name, int possible_regnum); +using tdesc_unknown_register_ftype + =3D int (*) (struct gdbarch *gdbarch, tdesc_feature *feature, + const char *reg_name, int possible_regnum); =20 /* A deleter adapter for a target arch data. */ =20 diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc index 4f1a03237c9..e5d95726422 100644 --- a/gdbserver/tracepoint.cc +++ b/gdbserver/tracepoint.cc @@ -585,8 +585,8 @@ enum tracepoint_type fast_tracepoint, }; =20 -typedef enum eval_result_type (*condfn) (unsigned char *, - ULONGEST *); +using condfn =3D enum eval_result_type (*) (unsigned char *, + ULONGEST *); =20 /* The definition of a tracepoint. */