]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Use using instead of typedef
authorTom de Vries <tdevries@suse.de>
Thu, 11 Jun 2026 06:54:34 +0000 (08:54 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 11 Jun 2026 06:54:34 +0000 (08:54 +0200)
After commit 1eed06ae51d ("[gdbsupport] Use using instead of typedef in
next_iterator") I wondered if I could do something similar using sed.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
    's/^\([ \t]*\)typedef \([a-zA-Z_0-9:<>,.() ]*\) \([\*&][\*&]*\)\([a-zA-Z_0-9]*\);/\1using \4 = \2 \3;/'

$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
    's/^\([ \t]*\)typedef \([a-zA-Z_0-9:<>,.() ]*\) \([a-zA-Z_0-9]*\);/\1using \3 = \2;/'
...

Tested on x86_64-linux.

115 files changed:
gdb/aarch64-tdep.c
gdb/aarch64-windows-tdep.c
gdb/ada-exp.h
gdb/alpha-tdep.c
gdb/arch/xtensa.h
gdb/arm-linux-nat.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax.h
gdb/block.h
gdb/breakpoint.h
gdb/cli/cli-script.h
gdb/compile/compile-object-load.h
gdb/complaints.h
gdb/completer.h
gdb/config/djgpp/nl_types.h
gdb/darwin-nat.h
gdb/dcache.h
gdb/dictionary.h
gdb/dwarf2/index-common.h
gdb/dwarf2/line-header.h
gdb/dwarf2/read.c
gdb/elfread.c
gdb/expop.h
gdb/expression.h
gdb/extension.h
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/gdb_bfd.h
gdb/gdb_wchar.h
gdb/gdbtypes.h
gdb/gregset.h
gdb/h8300-tdep.c
gdb/hppa-tdep.c
gdb/i386-tdep.c
gdb/inferior-iter.h
gdb/linux-nat.c
gdb/lm32-tdep.c
gdb/location.h
gdb/loongarch-tdep.c
gdb/m32c-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/microblaze-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/msp430-tdep.c
gdb/nat/aarch64-linux-hw-point.h
gdb/nat/aarch64-linux.h
gdb/nat/amd64-linux-siginfo.c
gdb/nat/glibc_thread_db.h
gdb/nat/linux-osdata.c
gdb/nat/loongarch-linux-hw-point.h
gdb/nat/windows-nat.h
gdb/nds32-tdep.c
gdb/objfiles.h
gdb/or1k-tdep.c
gdb/proc-utils.h
gdb/procfs.c
gdb/prologue-value.h
gdb/python/py-registers.c
gdb/python/python-internal.h
gdb/python/python-limited-api-missing.h
gdb/quick-symbol.h
gdb/remote-notif.h
gdb/remote.c
gdb/rl78-tdep.c
gdb/rx-tdep.c
gdb/s12z-tdep.c
gdb/s390-tdep.c
gdb/ser-go32.c
gdb/ser-mingw.c
gdb/ser-tcp.c
gdb/serial.h
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/stubs/z80-stub.c
gdb/symfile.h
gdb/symtab.h
gdb/target.h
gdb/thread-iter.h
gdb/tilegx-tdep.c
gdb/tracepoint.h
gdb/tui/tui-layout.h
gdb/tui/tui-winsource.h
gdb/ui-file.h
gdb/ui-out.h
gdb/unittests/packed-selftests.c
gdb/utils.h
gdb/value.h
gdb/varobj.c
gdb/vax-tdep.c
gdb/windows-nat.h
gdb/xml-syscall.c
gdb/xstormy16-tdep.c
gdbserver/gdbreplay.cc
gdbserver/linux-arm-low.cc
gdbserver/proc-service.cc
gdbserver/remote-utils.cc
gdbsupport/buildargv.h
gdbsupport/common-types.h
gdbsupport/default-init-alloc.h
gdbsupport/event-loop.h
gdbsupport/filestuff.h
gdbsupport/format.h
gdbsupport/gdb-dlfcn.h
gdbsupport/gdb-hashtab.h
gdbsupport/gdb_file.h
gdbsupport/gdb_proc_service.h
gdbsupport/observable.h
gdbsupport/safe-iterator.h
gdbsupport/scoped_restore.h
gdbsupport/tdesc.h
gdbsupport/thread-pool.h

index 0cce4072ac7a7f3acf83396b198c445522b9c9c8..886e7ce1e7b6e741cd7612b07d574ffef02697f7 100644 (file)
@@ -2581,7 +2581,7 @@ aarch64_gdb_print_insn (bfd_vma memaddr, disassemble_info *info)
    1101.0100.0010.0000.0000.0000.0000.0000 = 0xd4200000.  */
 constexpr gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
 
-typedef BP_MANIPULATION (aarch64_default_breakpoint) aarch64_breakpoint;
+using aarch64_breakpoint = BP_MANIPULATION (aarch64_default_breakpoint);
 
 /* Extract from an array REGS containing the (raw) register state a
    function return value of type TYPE, and copy that, in virtual
index e7312d296aebde84891a9e05a6b15b128ba2e6d3..7932f27b83bf787e98da532fd2ed0ccf5a29fcb7 100644 (file)
@@ -27,7 +27,7 @@
    and BRK #0xf000 triggers a breakpoint exception in the debugger.  */
 constexpr gdb_byte aarch64_windows_breakpoint[] = {0x00, 0x00, 0x3e, 0xd4};
 
-typedef BP_MANIPULATION (aarch64_windows_breakpoint) aarch64_w_breakpoint;
+using aarch64_w_breakpoint = BP_MANIPULATION (aarch64_windows_breakpoint);
 
 /* gdbarch initialization for Windows on AArch64.  */
 
index 05124ebdd3e1de9f2c640d9a214c89ec44a997ce..134f767ae5e7c9afeb2f7471d310ff3fd0ab4e69 100644 (file)
@@ -627,7 +627,7 @@ protected:
 };
 
 /* Unique pointer specialization for Ada assignment components.  */
-typedef std::unique_ptr<ada_component> ada_component_up;
+using ada_component_up = std::unique_ptr<ada_component>;
 
 /* An operation that holds a single component.  */
 class ada_aggregate_operation
@@ -760,7 +760,7 @@ protected:
 };
 
 /* Unique pointer specialization for Ada assignment associations.  */
-typedef std::unique_ptr<ada_association> ada_association_up;
+using ada_association_up = std::unique_ptr<ada_association>;
 
 /* A component that holds a vector of associations and an operation.
    The operation is re-evaluated for each choice.  */
index 9687c15202685a695413952ea95c77bc8660b38e..e68d5aee5533eded639e6ae56c9f6012d065888a 100644 (file)
@@ -622,7 +622,7 @@ alpha_return_in_memory_always (struct type *type)
 
 constexpr gdb_byte alpha_break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */
 
-typedef BP_MANIPULATION (alpha_break_insn) alpha_breakpoint;
+using alpha_breakpoint = BP_MANIPULATION (alpha_break_insn);
 
 \f
 /* This returns the PC of the first insn after the prologue.
index f9190cfbb6b8fe51718adc0633b9fb65833e82cd..079a4515fef6703d072e5d905c77486515d77556 100644 (file)
@@ -23,7 +23,7 @@
 /* Xtensa ELF core file register set representation ('.reg' section).
    Copied from target-side ELF header <xtensa/elf.h>.  */
 
-typedef uint32_t xtensa_elf_greg_t;
+using xtensa_elf_greg_t = uint32_t;
 
 typedef struct
 {
index b3d4ce1ec37aff22b85dd624e590aba71f0222e9..007d8d74eb6878af283385c90339877570833a9f 100644 (file)
@@ -696,7 +696,7 @@ typedef enum
 } arm_hwbp_type;
 
 /* Type describing an ARM Hardware Breakpoint Control register value.  */
-typedef unsigned int arm_hwbp_control_t;
+using arm_hwbp_control_t = unsigned int;
 
 /* Structure used to keep track of hardware break-/watch-points.  */
 struct arm_linux_hw_breakpoint
index 08cce9dbad88477a20fda87fadf9642ae5d9067f..7f2ddb31a64affe038f7d29d8b2f63fe70909362 100644 (file)
@@ -95,7 +95,7 @@ struct arm_mapping_symbol
   { return this->value < other.value; }
 };
 
-typedef std::vector<arm_mapping_symbol> arm_mapping_symbol_vec;
+using arm_mapping_symbol_vec = std::vector<arm_mapping_symbol>;
 
 struct arm_per_bfd
 {
index f445a2db6ba784fc7f8092da4b1a9725f423a68a..72151df7a49723be6dd4b02e12e72b484cfb3bf0 100644 (file)
@@ -922,7 +922,7 @@ avr_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 constexpr gdb_byte avr_break_insn [] = { 0x98, 0x95 };
 
-typedef BP_MANIPULATION (avr_break_insn) avr_breakpoint;
+using avr_breakpoint = BP_MANIPULATION (avr_break_insn);
 
 /* Determine, for architecture GDBARCH, how a return value of TYPE
    should be returned.  If it is supposed to be returned in registers,
index ccfc7a47d14d74d4955e942c104c02da6700c297..8e481886b76a7357d99ac09b3d8c51b175715e73 100644 (file)
--- a/gdb/ax.h
+++ b/gdb/ax.h
@@ -144,7 +144,7 @@ struct agent_expr
   };
 
 /* An agent_expr owning pointer.  */
-typedef std::unique_ptr<agent_expr> agent_expr_up;
+using agent_expr_up = std::unique_ptr<agent_expr>;
 
 /* The actual values of the various bytecode operations.  */
 
index cd02006f860d17e4b59a300442dd2a97079d34c4..8e87f9b8b23bd7ed3d5b616d08f223ef0b2d82e2 100644 (file)
@@ -607,8 +607,8 @@ extern struct symbol *block_iterator_next (struct block_iterator *iterator);
    C++.  */
 struct block_iterator_wrapper
 {
-  typedef block_iterator_wrapper self_type;
-  typedef struct symbol *value_type;
+  using self_type = block_iterator_wrapper;
+  using value_type = struct symbol *;
 
   explicit block_iterator_wrapper (const struct block *block,
                                   const lookup_name_info *name = nullptr)
index 3e84f1c99abf1391364ca56e08f461beed739ce9..7149211a055b4c9a8ca1584180b45e31f4cf03ae 100644 (file)
@@ -1535,7 +1535,7 @@ struct breakpoint_deleter
   }
 };
 
-typedef std::unique_ptr<struct breakpoint, breakpoint_deleter> breakpoint_up;
+using breakpoint_up = std::unique_ptr<struct breakpoint, breakpoint_deleter>;
 
 extern breakpoint_up set_momentary_breakpoint
   (struct gdbarch *, struct symtab_and_line, struct frame_id, enum bptype);
index 4937ba0456e056626e256daf19f691ef81836ad3..e78d7a65a146cdb0d1bca1a389cd7af2652f3536 100644 (file)
@@ -65,10 +65,10 @@ struct command_lines_deleter
 };
 
 /* A reference-counted struct command_line.  */
-typedef std::shared_ptr<command_line> counted_command_line;
+using counted_command_line = std::shared_ptr<command_line>;
 
 /* A unique_ptr specialization for command_line.  */
-typedef std::unique_ptr<command_line, command_lines_deleter> command_line_up;
+using command_line_up = std::unique_ptr<command_line, command_lines_deleter>;
 
 /* Structure for saved commands lines (for breakpoints, defined
    commands, etc).  */
index af4e2db27f180ebabc9e60995f578efaac9c0383..571a1774bdf04709831f014b33e3879a8ca6738f 100644 (file)
@@ -89,7 +89,7 @@ struct compile_module
 };
 
 /* A unique pointer for a compile_module.  */
-typedef std::unique_ptr<compile_module> compile_module_up;
+using compile_module_up = std::unique_ptr<compile_module>;
 
 extern compile_module_up compile_object_load
   (const compile_file_names &fnames,
index 8f5cf24c1c9b8895d07f8224fb0b93c11c0c228d..2bcd4074b7554b0e1bd75b2b86cb04fac22413a5 100644 (file)
@@ -58,7 +58,7 @@ extern void clear_complaints ();
 
 /* Type of collected complaints.  */
 
-typedef gdb::unordered_set<std::string> complaint_collection;
+using complaint_collection = gdb::unordered_set<std::string>;
 
 /* A class that can handle calls to complaint from multiple threads.
    When this is instantiated, it hooks into the complaint mechanism,
index be8f4814158fb05f5ab571cb9c5abcbe5f202cb3..8e924a1da6e5e02c3a5a83dbc8ec7191a6ba310e 100644 (file)
@@ -66,7 +66,7 @@ struct match_list_displayer
 /* A list of completion candidates.  Each element is a malloc string,
    because ownership of the strings is transferred to readline, which
    calls free on each element.  */
-typedef std::vector<gdb::unique_xmalloc_ptr<char>> completion_list;
+using completion_list = std::vector<gdb::unique_xmalloc_ptr<char>>;
 
 /* The result of a successful completion match.  When doing symbol
    comparison, we use the symbol search name for the symbol name match
index e24864413c93428e2ccbb14c065612c641e78fda..69e4395b04745ac3425d02454940df36f97c120e 100644 (file)
@@ -20,6 +20,6 @@
 #ifndef GDB_CONFIG_DJGPP_NL_TYPES_H
 #define GDB_CONFIG_DJGPP_NL_TYPES_H
 
-typedef int nl_item;
+using nl_item = int;
 
 #endif /* GDB_CONFIG_DJGPP_NL_TYPES_H */
index 18e9da5ac7ccd9f926f5455af84c70fbeebb1258..60c3adf0e671243e3745228d6f6b0f9cc52f518b 100644 (file)
@@ -72,7 +72,7 @@ struct darwin_thread_info : public private_thread_info
   /* The last exception received.  */
   struct darwin_exception_msg event {};
 };
-typedef struct darwin_thread_info darwin_thread_t;
+using darwin_thread_t = struct darwin_thread_info;
 
 /* This needs to be overridden by the platform specific nat code.  */
 
index f39ef75c5a7eb470f8bb2821fd3aaca2363ee3fc..7085fb975fec8b3e668b353b393c0aa5b395820c 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "target.h"
 
-typedef struct dcache_struct DCACHE;
+using DCACHE = struct dcache_struct;
 
 /* Invalidate DCACHE.  */
 void dcache_invalidate (DCACHE *dcache);
index d4ed8ae744d53b6851e6b22753cb107eca47d467..d28d50d3d35953e7e1e3fe818ffb3560175dbeda 100644 (file)
@@ -167,8 +167,8 @@ extern int mdict_size (const struct multidictionary *mdict);
    C++.  */
 struct mdict_iterator_wrapper
 {
-  typedef mdict_iterator_wrapper self_type;
-  typedef struct symbol *value_type;
+  using self_type = mdict_iterator_wrapper;
+  using value_type = struct symbol *;
 
   explicit mdict_iterator_wrapper (const struct multidictionary *mdict)
     : m_sym (mdict_iterator_first (mdict, &m_iter))
index 121f7061f1686d4c6105a0bd890432501c1b9785..f2862bbf80627559dbf64bdff17583e2bec8da48 100644 (file)
@@ -29,7 +29,7 @@
 
 /* All offsets in the index are of this type.  It must be
    architecture-independent.  */
-typedef uint32_t offset_type;
+using offset_type = uint32_t;
 
 /* The hash function for strings in the mapped index.  This is the same as
    SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
index 06ce5f0e124f546a732e1ccc6bdfe4a6b7133259..1d09824ff5c4eb7a105158fcd3dbfb12e3c45430 100644 (file)
@@ -27,11 +27,11 @@ struct dwarf2_cu;
 
 /* dir_index is 1-based in DWARF 4 and before, and is 0-based in DWARF 5 and
    later.  */
-typedef int dir_index;
+using dir_index = int;
 
 /* file_name_index is 1-based in DWARF 4 and before, and is 0-based in DWARF 5
    and later.  */
-typedef int file_name_index;
+using file_name_index = int;
 
 struct line_header;
 
index 742be7656b152781b14b6dbff1dfc3ae6868a74e..84b1480dbcba598c2a7697175dd661ab69202d52 100644 (file)
@@ -5455,7 +5455,7 @@ read_import_statement (struct die_info *die, struct dwarf2_cu *cu)
        The import in the following code:
        namespace A
          {
-           typedef int B;
+           using B = int;
          }
 
        int main ()
index fd4d045d27a3c654a65fb4353d0e47163702e909..e3890ae0270cc1db0878eac59f097c104f6e20ea 100644 (file)
@@ -78,7 +78,7 @@ struct elfinfo
 
 /* Type for per-BFD data.  */
 
-typedef std::vector<std::unique_ptr<probe>> elfread_data;
+using elfread_data = std::vector<std::unique_ptr<probe>>;
 
 /* Per-BFD data for probe info.  */
 
index c58a8d7ac37a365d4157075d29d0a82846044974..fb4139d3b33aac13497b14af071c260f212ef187 100644 (file)
@@ -565,7 +565,7 @@ private:
 /* A floating-point constant.  The constant is encoded in the target
    format.  */
 
-typedef std::array<gdb_byte, 16> float_data;
+using float_data = std::array<gdb_byte, 16>;
 
 /* An operation that holds a floating-point constant of a given
    type.
index 3bba692ae81cdb68a6bf65fdf8a90438aed7effb..ce8abb4380ede26cb9a5f452b760b3dd253dec1f 100644 (file)
@@ -79,7 +79,7 @@ namespace expr
 {
 
 class operation;
-typedef std::unique_ptr<operation> operation_up;
+using operation_up = std::unique_ptr<operation>;
 
 /* Base class for an operation.  An operation is a single component of
    an expression.  */
@@ -248,7 +248,7 @@ struct expression
   expr::operation_up op;
 };
 
-typedef std::unique_ptr<expression> expression_up;
+using expression_up = std::unique_ptr<expression>;
 
 /* When parsing expressions we track the innermost block that was
    referenced.  */
index e351b5b672ed558ca6ba4a28dcf0b7868269749c..b7bbf2a502de585ed5ddcdc1505a01a9fde0a91d 100644 (file)
@@ -232,7 +232,7 @@ private:
   const extension_language_defn *m_extlang;
 };
 
-typedef std::unique_ptr<xmethod_worker> xmethod_worker_up;
+using xmethod_worker_up = std::unique_ptr<xmethod_worker>;
 
 /* The interface for gdb's own extension(/scripting) language.  */
 extern const struct extension_language_defn extension_language_gdb;
index 33a270497f3cc0de4dc78fd7cb484d35e63ef05d..2df41557148a43e60cf50d7f2e81315e10caa27e 100644 (file)
@@ -422,7 +422,7 @@ frv_register_sim_regno (struct gdbarch *gdbarch, int reg)
 
 constexpr gdb_byte frv_break_insn[] = {0xc0, 0x70, 0x00, 0x01};
 
-typedef BP_MANIPULATION (frv_break_insn) frv_breakpoint;
+using frv_breakpoint = BP_MANIPULATION (frv_break_insn);
 
 /* Define the maximum number of instructions which may be packed into a
    bundle (VLIW instruction).  */
index ba0a0882a0ad7915ab75ef0da86e3277c79b4e47..45afebb18e9f5968b9dde183df0794d9d3e11b05 100644 (file)
@@ -77,7 +77,7 @@ ft32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
 constexpr gdb_byte ft32_break_insn[] = { 0x02, 0x00, 0x34, 0x00 };
 
-typedef BP_MANIPULATION (ft32_break_insn) ft32_breakpoint;
+using ft32_breakpoint = BP_MANIPULATION (ft32_break_insn);
 
 /* FT32 register names.  */
 
index 09b544b3b26a74ae7790b1d9452a1d6d37a478bf..b1b295f22e07d457359536c2c07ce5af659ca76e 100644 (file)
@@ -83,7 +83,7 @@ struct gdb_bfd_ref_policy
 };
 
 /* A gdb::ref_ptr that has been specialized for BFD objects.  */
-typedef gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy> gdb_bfd_ref_ptr;
+using gdb_bfd_ref_ptr = gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy>;
 
 /* Open a read-only (FOPEN_RB) BFD given arguments like bfd_fopen.
    If NAME starts with TARGET_SYSROOT_PREFIX then the BFD will be
index 5f51ddc4dcf24ecf5988d539f5cb2db45ef7e018..8f27f3ba3cec4355c3a2085051ba304a98f98d6e 100644 (file)
@@ -61,8 +61,8 @@
   && (defined (__STDC_ISO_10646__) \
       || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108))
 
-typedef wchar_t gdb_wchar_t;
-typedef wint_t gdb_wint_t;
+using gdb_wchar_t = wchar_t;
+using gdb_wint_t = wint_t;
 
 #define gdb_wcslen wcslen
 #define gdb_iswprint iswprint
@@ -109,8 +109,8 @@ const char *intermediate_encoding (void);
 #define PHONY_ICONV
 #endif
 
-typedef char gdb_wchar_t;
-typedef int gdb_wint_t;
+using gdb_wchar_t = char;
+using gdb_wint_t = int;
 
 #define gdb_wcslen strlen
 #define gdb_iswprint c_isprint
index 97adbe61db874c6a387cde094fa9c2ad67b73cca..572bf6d3d6fd7f3cd4d07736329e90f3713a6b7d 100644 (file)
@@ -1798,7 +1798,7 @@ struct rank
 
 /* Used for ranking a function for overload resolution.  */
 
-typedef std::vector<rank> badness_vector;
+using badness_vector = std::vector<rank>;
 
 /* GNAT Ada-specific information for various Ada types.  */
 
index 27733e3a23fe9f27b42cef8edc804903478e6049..a3629e3538973901211ab34652cf9449478b680c 100644 (file)
@@ -31,8 +31,8 @@
 #define GDB_FPREGSET_T fpregset_t
 #endif
 
-typedef GDB_GREGSET_T gdb_gregset_t;
-typedef GDB_FPREGSET_T gdb_fpregset_t;
+using gdb_gregset_t = GDB_GREGSET_T;
+using gdb_fpregset_t = GDB_FPREGSET_T;
 
 struct regcache;
 
index 086bf69b0ed75118488e35738d76177e56a35916..ca9c326d75235d71f8f0b915b0a65104e25b588c 100644 (file)
@@ -1228,7 +1228,7 @@ h8300s_dbg_reg_to_regnum (struct gdbarch *gdbarch, int regno)
 /*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */
 constexpr gdb_byte h8300_break_insn[] = { 0x01, 0x80 };        /* Sleep */
 
-typedef BP_MANIPULATION (h8300_break_insn) h8300_breakpoint;
+using h8300_breakpoint = BP_MANIPULATION (h8300_break_insn);
 
 static struct gdbarch *
 h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
index a2df05b4d293fc7d6279c7ed391a11bca0f2a7e2..8f4e88df31817bf77c7940f6d19b78edf082c9a8 100644 (file)
@@ -593,7 +593,7 @@ hppa_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 constexpr gdb_byte hppa_break_insn[] = {0x00, 0x01, 0x00, 0x04};
 
-typedef BP_MANIPULATION (hppa_break_insn) hppa_breakpoint;
+using hppa_breakpoint = BP_MANIPULATION (hppa_break_insn);
 
 /* Return the name of a register.  */
 
index fa935b5fcdbc6d49ec53723ed0a64e5ac31be853..c21e19d1576c002a6ead440da3cec33966c6b340 100644 (file)
@@ -515,7 +515,7 @@ static const char *disassembly_flavor = att_flavor;
 
 constexpr gdb_byte i386_break_insn[] = { 0xcc }; /* int 3 */
 
-typedef BP_MANIPULATION (i386_break_insn) i386_breakpoint;
+using i386_breakpoint = BP_MANIPULATION (i386_break_insn);
 
 \f
 /* Displaced instruction handling.  */
index aa3d0957a1dfa6ff39ba6505f01c57ca6b06adbd..b2d3862cc98700cca15e099ee39749c1a11150da 100644 (file)
 class all_inferiors_iterator
 {
 public:
-  typedef all_inferiors_iterator self_type;
-  typedef struct inferior *value_type;
-  typedef struct inferior *&reference;
-  typedef struct inferior **pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = all_inferiors_iterator;
+  using value_type = struct inferior *;
+  using reference = struct inferior *&;
+  using pointer = struct inferior **;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   /* Create an iterator pointing at HEAD.  */
   all_inferiors_iterator (process_stratum_target *proc_target,
index 868f08e18fb7b348bfa46d1640e73f0c789bd5f5..8840dbe3f75ef55929343f3eebcd3817d1d59c1b 100644 (file)
@@ -500,7 +500,7 @@ struct lwp_deleter
 
 /* A unique_ptr specialisation for lwp_info.  */
 
-typedef std::unique_ptr<struct lwp_info, lwp_deleter> lwp_info_up;
+using lwp_info_up = std::unique_ptr<struct lwp_info, lwp_deleter>;
 
 /* Target hook for follow_fork.  */
 
index 77989fe1c7fed9075e04ccf314f809897c5bc97d..2e2ca4d21d336e73cb41ac7e62327eb7dd3e9462 100644 (file)
@@ -207,7 +207,7 @@ lm32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Create a breakpoint instruction.  */
 constexpr gdb_byte lm32_break_insn[4] = { OP_RAISE << 2, 0, 0, 2 };
 
-typedef BP_MANIPULATION (lm32_break_insn) lm32_breakpoint;
+using lm32_breakpoint = BP_MANIPULATION (lm32_break_insn);
 
 
 /* Setup registers and stack for faking a call to a function in the
index 6d2f0ce86442fc87c1fcecc7d9e0a1b4de55087f..f97a8672a92302f7e16f88e0f4e7b4f728a7be11 100644 (file)
@@ -68,7 +68,7 @@ enum location_spec_type
 };
 
 /* A unique pointer for location_spec.  */
-typedef std::unique_ptr<location_spec> location_spec_up;
+using location_spec_up = std::unique_ptr<location_spec>;
 
 /* The base class for all location specs used to resolve actual
    locations in the inferior.  */
index 225b1abb703a346a48bbe75f530cdf14792bbbd9..999fd6a864de76f8e5c3551d8a779791164c420b 100644 (file)
@@ -1905,7 +1905,7 @@ loongarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int regnum)
 }
 
 static constexpr gdb_byte loongarch_default_breakpoint[] = {0x05, 0x00, 0x2a, 0x00};
-typedef BP_MANIPULATION (loongarch_default_breakpoint) loongarch_breakpoint;
+using loongarch_breakpoint = BP_MANIPULATION (loongarch_default_breakpoint);
 
 /* Extract a set of required target features out of ABFD.  If ABFD is nullptr
    then a LOONGARCH_GDBARCH_FEATURES is returned in its default state.  */
index f9d46c00b9cabf845199ab903fea117208fbbb2a..a06a601dee303249b7a496fc6ce0357beb78724e 100644 (file)
@@ -991,7 +991,7 @@ make_regs (struct gdbarch *arch)
 /* Breakpoints.  */
 constexpr gdb_byte m32c_break_insn[] = { 0x00 };       /* brk */
 
-typedef BP_MANIPULATION (m32c_break_insn) m32c_breakpoint;
+using m32c_breakpoint = BP_MANIPULATION (m32c_break_insn);
 
 \f
 /* Prologue analysis.  */
index a036dc26eb6b614e0f07773c0d55cbbd26f33650..9ec8cebd9f4ef2928e8574e52cb563e83b4f095a 100644 (file)
@@ -403,7 +403,7 @@ m68hc11_register_name (struct gdbarch *gdbarch, int reg_nr)
 
 constexpr gdb_byte m68hc11_break_insn[] = {0x0};
 
-typedef BP_MANIPULATION (m68hc11_break_insn) m68hc11_breakpoint;
+using m68hc11_breakpoint = BP_MANIPULATION (m68hc11_break_insn);
 \f
 /* 68HC11 & 68HC12 prologue analysis.  */
 
index 72b1a7a51875debf63d1e784953a581f87aeffb8..c23e3a48f920205dc51ee2ebe36c808972a3f4db 100644 (file)
@@ -63,7 +63,7 @@
 
 constexpr gdb_byte m68k_break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
 
-typedef BP_MANIPULATION (m68k_break_insn) m68k_breakpoint;
+using m68k_breakpoint = BP_MANIPULATION (m68k_break_insn);
 \f
 
 /* Construct types for ISA-specific registers.  */
index 9f8e8ebca3891cd7ebce73c0f070d7f9520fc2d8..954dc07ec516d619ba116b806c56a972089c8493 100644 (file)
@@ -1906,7 +1906,7 @@ mep_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Breakpoints.  */
 constexpr gdb_byte mep_break_insn[] = { 0x70, 0x32 };
 
-typedef BP_MANIPULATION (mep_break_insn) mep_breakpoint;
+using mep_breakpoint = BP_MANIPULATION (mep_break_insn);
 
 \f
 /* Frames and frame unwinding.  */
index 352d6c1710517a56b618cf398ca8a92b620edfff..93b81fe6f7c5d5a79f7b623bdd1a08979ca31cb3 100644 (file)
@@ -127,7 +127,7 @@ microblaze_fetch_instruction (CORE_ADDR pc)
 \f
 constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT;
 
-typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint;
+using microblaze_breakpoint = BP_MANIPULATION (microblaze_break_insn);
 
 \f
 /* Allocate and initialize a frame cache.  */
index ee80bddaeee617f167d46108b39ba0ad094da251..5e78d59620c4d37f59def2914c9e4f2342a80492 100644 (file)
@@ -308,7 +308,7 @@ mn10300_register_type (struct gdbarch *gdbarch, int reg)
    one, so we defined it ourselves.  */
 constexpr gdb_byte mn10300_break_insn[] = {0xff};
 
-typedef BP_MANIPULATION (mn10300_break_insn) mn10300_breakpoint;
+using mn10300_breakpoint = BP_MANIPULATION (mn10300_break_insn);
 
 /* Model the semantics of pushing a register onto the stack.  This
    is a helper function for mn10300_analyze_prologue, below.  */
index c8a04d21f593549feaa56f38f4206eee5ef7a5b9..f99ad44df72b6685e2e029c00743c8ab54dad319 100644 (file)
@@ -66,7 +66,7 @@ moxie_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
 constexpr gdb_byte moxie_break_insn[] = { 0x35, 0x00 };
 
-typedef BP_MANIPULATION (moxie_break_insn) moxie_breakpoint;
+using moxie_breakpoint = BP_MANIPULATION (moxie_break_insn);
 
 /* Moxie register names.  */
 
index a1c885497c0d74bc97ebd1afec4cba894c51c510..92f548653afc33d260e6575c5dc237ddc848227b 100644 (file)
@@ -281,7 +281,7 @@ msp430_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 
 constexpr gdb_byte msp430_break_insn[] = { 0x43, 0x43 };
 
-typedef BP_MANIPULATION (msp430_break_insn) msp430_breakpoint;
+using msp430_breakpoint = BP_MANIPULATION (msp430_break_insn);
 
 /* Define a "handle" struct for fetching the next opcode.  */
 
index 3ce8674ab959e8259497a827cd96deeeb18d2aa3..814449bd4cbad2a010ea20191d5a9a19049f3d0b 100644 (file)
@@ -56,7 +56,7 @@
    ptrace calls to the kernel, i.e. avoid asking the kernel to write
    to the debug registers with unchanged values.  */
 
-typedef ULONGEST dr_changed_t;
+using dr_changed_t = ULONGEST;
 
 /* Set each of the lower M bits of X to 1; assert X is wide enough.  */
 
index bb5381eba3ef1b68509bf9bb98dbc70d49627081..5f699e1f351a946e78916a656f1a55ca6c9d5885 100644 (file)
 /* Defines ps_err_e, struct ps_prochandle.  */
 #include "gdb_proc_service.h"
 
-typedef int compat_int_t;
-typedef unsigned int compat_uptr_t;
+using compat_int_t = int;
+using compat_uptr_t = unsigned int;
 
-typedef int compat_time_t;
-typedef int compat_timer_t;
-typedef int compat_clock_t;
+using compat_time_t = int;
+using compat_timer_t = int;
+using compat_clock_t = int;
 
 struct compat_timeval
 {
index 195e1cd6c2181a2f25ec139272a863b821f22996..8f1e4acc47e42e94ec0b1309ca0d96cc584b9b7e 100644 (file)
 
 #ifndef __ILP32__
 
-typedef int nat_int_t;
-typedef unsigned long nat_uptr_t;
+using nat_int_t = int;
+using nat_uptr_t = unsigned long;
 
-typedef int nat_time_t;
-typedef int nat_timer_t;
+using nat_time_t = int;
+using nat_timer_t = int;
 
 /* For native 64-bit, clock_t in _sigchld is 64-bit.  */
-typedef long nat_clock_t;
+using nat_clock_t = long;
 
 union nat_sigval_t
 {
@@ -119,12 +119,12 @@ struct nat_siginfo_t
    compatible with the siginfo type exported by the 32-bit userspace
    support.  */
 
-typedef int compat_int_t;
-typedef unsigned int compat_uptr_t;
+using compat_int_t = int;
+using compat_uptr_t = unsigned int;
 
-typedef int compat_time_t;
-typedef int compat_timer_t;
-typedef int compat_clock_t;
+using compat_time_t = int;
+using compat_timer_t = int;
+using compat_clock_t = int;
 
 struct compat_timeval
 {
@@ -203,7 +203,7 @@ struct compat_siginfo_t
 };
 
 /* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes.  */
-typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
+using compat_x32_clock_t = long __attribute__ ((__aligned__ (4)));
 
 struct __attribute__ ((__aligned__ (8))) compat_x32_siginfo_t
 {
@@ -299,9 +299,9 @@ struct __attribute__ ((__aligned__ (8))) compat_x32_siginfo_t
    PTRACE_GETSIGINFO.  If gdb is built as a x32 program, we get a x32
    siginfo.  */
 #ifdef __ILP32__
-typedef compat_x32_siginfo_t ptrace_siginfo_t;
+using ptrace_siginfo_t = compat_x32_siginfo_t;
 #else
-typedef nat_siginfo_t ptrace_siginfo_t;
+using ptrace_siginfo_t = nat_siginfo_t;
 #endif
 
 /*  Convert the system provided siginfo into compatible siginfo.  */
index 87eb62b3efec934d32d995fd7015c7c9e22f33d1..4e23de5641d22d17631fbceb74b80808ad77768a 100644 (file)
@@ -86,7 +86,7 @@ typedef enum
 /* Types of the debugging library.  */
 
 /* Handle for a process.  This type is opaque.  */
-typedef struct td_thragent td_thragent_t;
+using td_thragent_t = struct td_thragent;
 
 /* The actual thread handle type.  This is also opaque.  */
 typedef struct td_thrhandle
@@ -239,8 +239,8 @@ typedef struct td_ta_stats
 
 /* Since Sun's library is based on Solaris threads we have to define a few
    types to map them to POSIX threads.  */
-typedef pthread_t thread_t;
-typedef pthread_key_t thread_key_t;
+using thread_t = pthread_t;
+using thread_key_t = pthread_key_t;
 
 
 /* Callback for iteration over threads.  */
index 248dbab942890b89a39b1ab58ac6d337aceb5c4d..a2cadb43d597652968f6faa220a345e22ae23b27 100644 (file)
    so that reading pid values embedded in /proc works
    consistently.  */
 
-typedef long long  PID_T;
+using PID_T = long long ;
 
 /* Define TIME_T to be at least as large as time_t, so that reading
    time values embedded in /proc works consistently.  */
 
-typedef long long TIME_T;
+using TIME_T = long long;
 
 #define MAX_PID_T_STRLEN  (sizeof ("-9223372036854775808") - 1)
 
index 766f62ce0d0402863f1e25eb1921b9de5342541d..9a3d8877dee73cfa6b984b03c7104c0621596874 100644 (file)
@@ -60,7 +60,7 @@ struct loongarch_user_watch_state {
    ptrace calls to the kernel, i.e. avoid asking the kernel to write
    to the debug registers with unchanged values.  */
 
-typedef ULONGEST dr_changed_t;
+using dr_changed_t = ULONGEST;
 
 /* Set each of the lower M bits of X to 1; assert X is wide enough.  */
 
index 52378765438660be8de8cf2a3ff30cab25d34fb5..2b23978712623f6f66b8322a3bf67ac110f0c3a4 100644 (file)
@@ -485,7 +485,7 @@ extern GenerateConsoleCtrlEvent_ftype *GenerateConsoleCtrlEvent;
 
 /* We use a local typedef for this type to avoid depending on
    Windows 8.  */
-typedef void *gdb_lpproc_thread_attribute_list;
+using gdb_lpproc_thread_attribute_list = void *;
 
 typedef BOOL WINAPI (InitializeProcThreadAttributeList_ftype)
      (gdb_lpproc_thread_attribute_list lpAttributeList,
index 3640b31ec274b21b251ceaeefa03dd030bc61fe5..820aa9b59136b740d220c23492c81b178bbc89e6 100644 (file)
@@ -283,7 +283,7 @@ nds32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 /* The same insn machine code is used for little-endian and big-endian.  */
 constexpr gdb_byte nds32_break_insn[] = { 0xEA, 0x00 };
 
-typedef BP_MANIPULATION (nds32_break_insn) nds32_breakpoint;
+using nds32_breakpoint = BP_MANIPULATION (nds32_break_insn);
 
 /* Implement the "dwarf2_reg_to_regnum" gdbarch method.  */
 
index c8b989911e5f4d64ef00d6fbc997512217f36c27..406ab36b39d6e73ea6c4b83832a8301922baaaa4 100644 (file)
@@ -151,12 +151,12 @@ extern void print_objfile_statistics (void);
 
 struct minimal_symbol_iterator
 {
-  typedef minimal_symbol_iterator self_type;
-  typedef struct minimal_symbol *value_type;
-  typedef struct minimal_symbol *&reference;
-  typedef struct minimal_symbol **pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = minimal_symbol_iterator;
+  using value_type = struct minimal_symbol *;
+  using reference = struct minimal_symbol *&;
+  using pointer = struct minimal_symbol **;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   explicit minimal_symbol_iterator (struct minimal_symbol *msym)
     : m_msym (msym)
@@ -342,7 +342,7 @@ private:
 
 /* A range adapter wrapping separate_debug_iterator.  */
 
-typedef iterator_range<separate_debug_iterator> separate_debug_range;
+using separate_debug_range = iterator_range<separate_debug_iterator>;
 
 /* Sections in an objfile.  The section offsets are stored in the
    OBJFILE.  */
@@ -467,7 +467,7 @@ public:
   /* A range adapter that makes it possible to iterate over all
      minimal symbols of an objfile.  */
 
-  typedef iterator_range<minimal_symbol_iterator> msymbols_range;
+  using msymbols_range = iterator_range<minimal_symbol_iterator>;
 
   /* Return a range adapter for iterating over all minimal
      symbols.  */
@@ -875,7 +875,7 @@ struct objfile_unlinker
 
 /* A unique pointer that holds an objfile.  */
 
-typedef std::unique_ptr<objfile, objfile_unlinker> scoped_objfile_unlinker;
+using scoped_objfile_unlinker = std::unique_ptr<objfile, objfile_unlinker>;
 
 /* Relocation offset applied to the section.  */
 inline CORE_ADDR
index 55efa76234cc488aee9b61deb812a74b05e0abf9..32fef65dc3768f63de3fc0de78b564d5ba9b7f53 100644 (file)
@@ -344,7 +344,7 @@ or1k_return_value (struct gdbarch *gdbarch, struct value *functype,
 
 constexpr gdb_byte or1k_break_insn[] = {0x21, 0x00, 0x00, 0x01};
 
-typedef BP_MANIPULATION (or1k_break_insn) or1k_breakpoint;
+using or1k_breakpoint = BP_MANIPULATION (or1k_break_insn);
 
 static bool
 or1k_delay_slot_p (struct gdbarch *gdbarch, CORE_ADDR pc)
index ccca9afaefe3a7ccb589bfe505fc32de53b22173..9f44e9b0a372ee9ada4aba963909bb7c038e41f8 100644 (file)
@@ -115,6 +115,6 @@ extern  void  procfs_note      (const char *, const char *, int);
 
 /* Define the type (and more importantly the width) of the control
    word used to write to the /proc/PID/ctl file.  */
-typedef long procfs_ctl_t;
+using procfs_ctl_t = long;
 
 #endif /* GDB_PROC_UTILS_H */
index 25319464bc8a255be9e7e2a2bded3d6c20f21c3d..64a71ea288346c2663fa1ecbb8d5d653e4a9874d 100644 (file)
@@ -542,7 +542,7 @@ struct procinfo_deleter
   }
 };
 
-typedef std::unique_ptr<procinfo, procinfo_deleter> procinfo_up;
+using procinfo_up = std::unique_ptr<procinfo, procinfo_deleter>;
 
 enum { NOKILL, KILL };
 
index bd8adddac17ba6d3b8a3224400d2bc47257ae183..87c23de397aec232c42b44483ca8803786128ca5 100644 (file)
@@ -149,7 +149,7 @@ struct prologue_value {
   CORE_ADDR k;
 };
 
-typedef struct prologue_value pv_t;
+using pv_t = struct prologue_value;
 
 
 /* Return the unknown prologue value --- { pvk_unknown, ?, ? }.  */
index cc7b09079da9ac017dfb2c47587cc9a9c5495eb6..e0180660715c71aa032412de4170c0c87cbc896b 100644 (file)
@@ -25,7 +25,7 @@
 #include "gdbsupport/unordered_map.h"
 
 /* Per-gdbarch data type.  */
-typedef std::vector<gdbpy_ref<>> gdbpy_register_type;
+using gdbpy_register_type = std::vector<gdbpy_ref<>>;
 
 /* Token to access per-gdbarch data related to register descriptors.  */
 static const registry<gdbarch>::key<gdbpy_register_type>
index 0cc5fc4ac06692378f2102e11a6514512edb5ce1..4ca28bb695743c31ffed72d0ef8c215bcb085068 100644 (file)
@@ -91,11 +91,11 @@ static_assert (PY_VERSION_HEX >= 0x03040000);
 #define GDB_PY_LL_ARG "L"
 #define GDB_PY_LLU_ARG "K"
 #if PY_VERSION_HEX >= 0x03060000
-typedef long long gdb_py_longest;
-typedef unsigned long long gdb_py_ulongest;
+using gdb_py_longest = long long;
+using gdb_py_ulongest = unsigned long long;
 #else
-typedef PY_LONG_LONG gdb_py_longest;
-typedef unsigned PY_LONG_LONG gdb_py_ulongest;
+using gdb_py_longest = PY_LONG_LONG;
+using gdb_py_ulongest = unsigned PY_LONG_LONG;
 #endif
 #define gdb_py_long_as_ulongest PyLong_AsUnsignedLongLong
 #define gdb_py_long_as_long_and_overflow PyLong_AsLongLongAndOverflow
@@ -104,8 +104,8 @@ typedef unsigned PY_LONG_LONG gdb_py_ulongest;
 
 #define GDB_PY_LL_ARG "l"
 #define GDB_PY_LLU_ARG "k"
-typedef long gdb_py_longest;
-typedef unsigned long gdb_py_ulongest;
+using gdb_py_longest = long;
+using gdb_py_ulongest = unsigned long;
 #define gdb_py_long_as_ulongest PyLong_AsUnsignedLong
 #define gdb_py_long_as_long_and_overflow PyLong_AsLongAndOverflow
 
@@ -1047,7 +1047,7 @@ struct Py_buffer_deleter
 };
 
 /* A unique_ptr specialization for Py_buffer.  */
-typedef std::unique_ptr<Py_buffer, Py_buffer_deleter> Py_buffer_up;
+using Py_buffer_up = std::unique_ptr<Py_buffer, Py_buffer_deleter>;
 
 /* Parse a register number from PYO_REG_ID and place the register number
    into *REG_NUM.  The register is a register for GDBARCH.
index 40359abf337a81acdebd61ffe1236796ad3750b2..3ff2b4bf935ba075ea8687f9599e8a8873bc4563 100644 (file)
@@ -29,7 +29,7 @@ extern "C"
 /* Symbols belonging to the configuration API introduced in PEP-741, and
    required in gdb_PyInitializer.  */
 
-typedef struct PyInitConfig PyInitConfig;
+using PyInitConfig = struct PyInitConfig;
 
 PyAPI_FUNC(PyInitConfig*) PyInitConfig_Create (void);
 PyAPI_FUNC(void) PyInitConfig_Free (PyInitConfig *config);
index 2d1ca78293ddc25181245bff5a7b0e48827b61ff..c548f956df9629ecc81cbf6db3c44141d4ac481d 100644 (file)
@@ -202,6 +202,6 @@ struct quick_symbol_functions
   }
 };
 
-typedef std::unique_ptr<quick_symbol_functions> quick_symbol_functions_up;
+using quick_symbol_functions_up = std::unique_ptr<quick_symbol_functions>;
 
 #endif /* GDB_QUICK_SYMBOL_H */
index c2d37cba59b06de41667378bafcf983a3efd7028..cec7db8025bf086d78f738548eee49a08b735b5a 100644 (file)
@@ -34,7 +34,7 @@ struct notif_event
 
 /* A unique pointer holding a notif_event.  */
 
-typedef std::unique_ptr<notif_event> notif_event_up;
+using notif_event_up = std::unique_ptr<notif_event>;
 
 /* ID of the notif_client.  */
 
index 2961664cf338feb93d1ef4938e36457b18f3a8f0..5443864ced7f69335a1c661c177161e9ad896c7d 100644 (file)
@@ -108,7 +108,7 @@ struct protocol_feature;
 struct packet_reg;
 
 struct stop_reply;
-typedef std::unique_ptr<stop_reply> stop_reply_up;
+using stop_reply_up = std::unique_ptr<stop_reply>;
 
 /* Generic configuration support for packets the stub optionally
    supports.  Allows the user to specify the use of the packet as well
@@ -3633,7 +3633,7 @@ remote_target::thread_name (struct thread_info *info)
 /* Right now, the internal structure is int. We want it to be bigger.
    Plan to fix this.  */
 
-typedef int gdb_threadref;     /* Internal GDB thread reference.  */
+using gdb_threadref = int;     /* Internal GDB thread reference.  */
 
 /* gdb_ext_thread_info is an internal GDB data structure which is
    equivalent to the reply of the remote threadinfo packet.  */
index 4c938333e06dbb7ce4cec455fbc8e8b99ecbd6f7..0de2fceb79595592fb1aeaf8804861f30fb44e3b 100644 (file)
@@ -799,7 +799,7 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
    0xff is used when a one byte breakpoint instruction is required.  */
 constexpr gdb_byte rl78_break_insn[] = { 0xff };
 
-typedef BP_MANIPULATION (rl78_break_insn) rl78_breakpoint;
+using rl78_breakpoint = BP_MANIPULATION (rl78_break_insn);
 
 /* Define a "handle" struct for fetching the next opcode.  */
 
index 96e2c5b1a75593e8e22d0a9ebbd0d246298c346f..eb974b36b6512998003068e1f9986b86b2894c0f 100644 (file)
@@ -926,7 +926,7 @@ rx_return_value (struct gdbarch *gdbarch,
 
 constexpr gdb_byte rx_break_insn[] = { 0x00 };
 
-typedef BP_MANIPULATION (rx_break_insn) rx_breakpoint;
+using rx_breakpoint = BP_MANIPULATION (rx_break_insn);
 
 /* Implement the dwarf_reg_to_regnum" gdbarch method.  */
 
index 6ac0930e5b09d161f25478807ca2af6e2ba4b46c..5d9cbe8254c73ca43c8936d350780f86cb789c40 100644 (file)
@@ -456,7 +456,7 @@ static const struct frame_unwind_legacy s12z_frame_unwind (
 
 constexpr gdb_byte s12z_break_insn[] = {0x00};
 
-typedef BP_MANIPULATION (s12z_break_insn) s12z_breakpoint;
+using s12z_breakpoint = BP_MANIPULATION (s12z_break_insn);
 
 struct s12z_gdbarch_tdep : gdbarch_tdep_base
 {
index 72ff92055bf0c7ea0c55447d970399209a6dde62..3e364fe371c92ba814a7dc4031e73a51c0016d19 100644 (file)
@@ -54,7 +54,7 @@ static std::string s390_disassembler_options;
 
 constexpr gdb_byte s390_break_insn[] = { 0x0, 0x1 };
 
-typedef BP_MANIPULATION (s390_break_insn) s390_breakpoint;
+using s390_breakpoint = BP_MANIPULATION (s390_break_insn);
 
 /* Types.  */
 
index 95801924fa9e790dc890d64bf7ea2c9c6a0a7161..85f5cd5fe0dab200636f5c51795808b513217fa1 100644 (file)
 #include <dos.h>
 #include <go32.h>
 #include <dpmi.h>
-typedef unsigned long u_long;
+using u_long = unsigned long;
 
 /* 16550 rx fifo trigger point */
 #define FIFO_TRIGGER   FIFO_TRIGGER_4
index 91209913ccc00fe371070fd6235dc95324d250fc..26c162ddf8fc85b6798966e0b7542e342347e14e 100644 (file)
@@ -853,7 +853,7 @@ struct pipe_state_destroyer
   }
 };
 
-typedef std::unique_ptr<pipe_state, pipe_state_destroyer> pipe_state_up;
+using pipe_state_up = std::unique_ptr<pipe_state, pipe_state_destroyer>;
 
 static void
 pipe_windows_open (struct serial *scb, const char *name)
index f70a788e0016caf7b146a33444a753e08d862146..c6a864c71e915182a79181be071a4f7eb6009131 100644 (file)
@@ -61,7 +61,7 @@
 #include <algorithm>
 
 #ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
 #endif
 
 /* For "set tcp" and "show tcp".  */
index ffe52ae064ca6ab040c41c1eeef11fee0e615178..0a87eabfa12163ec49d4598dc0038183985bce0d 100644 (file)
@@ -32,7 +32,7 @@ struct ui_file;
 /* Terminal state pointer.  This is specific to each type of
    interface.  */
 
-typedef void *serial_ttystate;
+using serial_ttystate = void *;
 struct serial;
 struct serial_ops;
 
index f9bad2851c6c4dec9d25213affbdc3a6432891a6..df6725e7930b5ce5aa0a1e4a6581e35196a9c79c 100644 (file)
 
 #ifdef HAVE_MACHINE_REG_H
 #ifdef HAVE_STRUCT_REG
-typedef struct reg gregset_t;
-typedef struct fpreg fpregset_t;
+using gregset_t = struct reg;
+using fpregset_t = struct fpreg;
 #else
-typedef struct regs gregset_t;
-typedef struct fp_status fpregset_t;
+using gregset_t = struct regs;
+using fpregset_t = struct fp_status;
 #endif
 #endif
 
index b16af5953f79efd693d633a3891334941d99e54f..573a98247243b4d182a9e3209ce178246af85618 100644 (file)
@@ -743,7 +743,7 @@ sparc32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
    location for inserting the breakpoint.  */
 constexpr gdb_byte sparc_break_insn[] = { 0x91, 0xd0, 0x20, 0x01 };
 
-typedef BP_MANIPULATION (sparc_break_insn) sparc_breakpoint;
+using sparc_breakpoint = BP_MANIPULATION (sparc_break_insn);
 \f
 
 /* Allocate and initialize a frame cache.  */
index 71f1554f8aa9ec79681cfd3ec4493a1fc99a7ffd..08a70e78b800fda3e1ac96763840c5765469f126 100644 (file)
@@ -239,8 +239,8 @@ extern int DBG_AWATCH(int set, void *addr, unsigned size);
 # define NULL (void*)0
 #endif
 
-typedef unsigned char byte;
-typedef unsigned short word;
+using byte = unsigned char;
+using word = unsigned short;
 
 /* CPU state */
 #ifdef __SDCC_ez80_adl
index 62859a1b0c671214af050894c45ec9235542cd47..770bd291ab11055ea388c7acd0c165ade896e9a9 100644 (file)
@@ -69,7 +69,7 @@ struct other_sections
    to communicate the section addresses in shared objects to
    symbol_file_add ().  */
 
-typedef std::vector<other_sections> section_addr_info;
+using section_addr_info = std::vector<other_sections>;
 
 /* A table listing the load segments in a symfile, and which segment
    each BFD section belongs to.  */
index 0a7ad3668b46c4757930af7e91571224f41e41da..b29b72aba00d4b873aae2dcc999c515903d1ae8e 100644 (file)
@@ -2698,7 +2698,7 @@ private:
    we return a vector of this type.  The first item in the pair is the
    module symbol, and the second item is the symbol for the function or
    variable we found.  */
-typedef std::pair<symbol_search, symbol_search> module_symbol_search;
+using module_symbol_search = std::pair<symbol_search, symbol_search>;
 
 /* Searches the symbols to find function and variables symbols (depending
    on KIND) within Fortran modules.  The MODULE_REGEXP matches against the
index 81726849d1e75b3e24bd475e2a1aa88aef21f360..22653138491ba26dfa6e661ac79517d163dc6975 100644 (file)
@@ -63,7 +63,7 @@ struct inferior;
 
 /* Define const gdb_byte using one identifier, to make it easy for
    make-target-delegates.py to parse.  */
-typedef const gdb_byte const_gdb_byte;
+using const_gdb_byte = const gdb_byte;
 
 #include "infrun.h"
 #include "breakpoint.h"
@@ -1425,7 +1425,7 @@ struct target_ops_deleter
 };
 
 /* A unique pointer for target_ops.  */
-typedef std::unique_ptr<target_ops, target_ops_deleter> target_ops_up;
+using target_ops_up = std::unique_ptr<target_ops, target_ops_deleter>;
 
 /* A policy class to interface gdb::ref_ptr with target_ops.  */
 
@@ -2499,7 +2499,7 @@ struct target_unpusher
 
 /* A unique_ptr that unpushes a target on destruction.  */
 
-typedef std::unique_ptr<struct target_ops, target_unpusher> target_unpush_up;
+using target_unpush_up = std::unique_ptr<struct target_ops, target_unpusher>;
 
 extern void target_pre_inferior ();
 
index 4e7e9ba963435046f94e65850259682f72e220be..c649560c0e1d14f94acdc0f88bcfe6756ad1a287 100644 (file)
@@ -34,12 +34,12 @@ using inf_threads_iterator = intrusive_list<thread_info>::iterator;
 class all_threads_iterator
 {
 public:
-  typedef all_threads_iterator self_type;
-  typedef struct thread_info value_type;
-  typedef struct thread_info &reference;
-  typedef struct thread_info *pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = all_threads_iterator;
+  using value_type = struct thread_info;
+  using reference = struct thread_info &;
+  using pointer = struct thread_info *;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   /* Tag type.  */
   struct begin_t {};
@@ -83,12 +83,12 @@ private:
 class all_matching_threads_iterator
 {
 public:
-  typedef all_matching_threads_iterator self_type;
-  typedef struct thread_info value_type;
-  typedef struct thread_info &reference;
-  typedef struct thread_info *pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = all_matching_threads_iterator;
+  using value_type = struct thread_info;
+  using reference = struct thread_info &;
+  using pointer = struct thread_info *;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   /* Creates an iterator that iterates over all threads that match
      FILTER_PTID.  */
index c9458fd526b86eba48f4b4652b65bf30b154c610..0d1421f8758cf95d13d9ae0c7746f5608a69f917 100644 (file)
@@ -828,7 +828,7 @@ tilegx_write_pc (struct regcache *regcache, CORE_ADDR pc)
 constexpr gdb_byte tilegx_break_insn[] =
   { 0x00, 0x50, 0x48, 0x51, 0xae, 0x44, 0x6a, 0x28 };
 
-typedef BP_MANIPULATION (tilegx_break_insn) tilegx_breakpoint;
+using tilegx_breakpoint = BP_MANIPULATION (tilegx_break_insn);
 
 /* Normal frames.  */
 
index 19742c9c2351bb657fdcefce33f914a3f84f96a0..0aab46e0e47a992978cc5c06f4f54cefc3cec2db 100644 (file)
@@ -36,7 +36,7 @@ struct traceframe_info
   std::vector<int> tvars;
 };
 
-typedef std::unique_ptr<traceframe_info> traceframe_info_up;
+using traceframe_info_up = std::unique_ptr<traceframe_info>;
 
 /* A trace state variable is a value managed by a target being
    traced.  A trace state variable (or tsv for short) can be accessed
index 536174c784d42482b8a1ae6b395da02e7281476a..0d39e0ffa48c25d50dc7b26d306d86ee54190b3b 100644 (file)
@@ -367,7 +367,7 @@ typedef std::function<tui_win_info * (const char *name)> window_factory;
 
 /* The type for a data structure that maps a window name to that window's
    factory function.  */
-typedef gdb::unordered_string_map<window_factory> window_types_map;
+using window_types_map = gdb::unordered_string_map<window_factory>;
 
 /* Register a new TUI window type.  NAME is the name of the window
    type.  FACTORY is a function that can be called to instantiate the
index d4b25cbf9cde91834495c25e824f2fcc491cbb00..9f94a45374980e0258aef770921ce3fd3a4c1d33 100644 (file)
@@ -270,12 +270,12 @@ public:
 
   typedef std::vector<tui_win_info *>::iterator inner_iterator;
 
-  typedef tui_source_window_iterator self_type;
-  typedef struct tui_source_window_base *value_type;
-  typedef struct tui_source_window_base *&reference;
-  typedef struct tui_source_window_base **pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = tui_source_window_iterator;
+  using value_type = struct tui_source_window_base *;
+  using reference = struct tui_source_window_base *&;
+  using pointer = struct tui_source_window_base **;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   explicit tui_source_window_iterator (const inner_iterator &it,
                                       const inner_iterator &end)
index 6a1d396433514fb66056655f659bf207d746307f..76185bbedf0921ab91314ff2e1966b63fe8965ad 100644 (file)
@@ -147,7 +147,7 @@ private:
   void printchar (int c, int quoter, bool async_safe);
 };
 
-typedef std::unique_ptr<ui_file> ui_file_up;
+using ui_file_up = std::unique_ptr<ui_file>;
 
 /* A ui_file that writes to nowhere.  */
 
@@ -295,7 +295,7 @@ private:
   bool m_close_p;
 };
 
-typedef std::unique_ptr<stdio_file> stdio_file_up;
+using stdio_file_up = std::unique_ptr<stdio_file>;
 
 /* Like stdio_file, but specifically for stderr.
 
index 28af8d521e77c52e015c2fe94fd4e7542d2b6ed8..d59e58631e9bf2eb2af513e0281f83119d6aa81b 100644 (file)
@@ -439,8 +439,8 @@ private:
   struct ui_out *m_uiout;
 };
 
-typedef ui_out_emit_type<ui_out_type_tuple> ui_out_emit_tuple;
-typedef ui_out_emit_type<ui_out_type_list> ui_out_emit_list;
+using ui_out_emit_tuple = ui_out_emit_type<ui_out_type_tuple>;
+using ui_out_emit_list = ui_out_emit_type<ui_out_type_list>;
 
 /* Start a new table on construction, and end the table on
    destruction.  */
index cef0baaa1d2e14b9676fac48f7e4049cc9319ab4..c089bf5d7d075525b271062d41a276009a516872 100644 (file)
@@ -58,7 +58,7 @@ CHECK_TRAIT (is_trivially_move_assignable);
 static void
 run_tests ()
 {
-  typedef packed<unsigned int, 2> packed_2;
+  using packed_2 = packed<unsigned int, 2>;
 
   packed_2 p1;
   packed_2 p2 (0x0102);
index ecef7d13c20a5460677604d438173d04c203d91b..07d707ce9cf04cd2039925309f08d2c103d5e62b 100644 (file)
@@ -429,7 +429,7 @@ struct warning_hook_handler_type
     = 0;
 };
 
-typedef warning_hook_handler_type *warning_hook_handler;
+using warning_hook_handler = warning_hook_handler_type *;
 
 /* Set the thread-local warning hook, and restore the old value when
    finished.  */
index 0267ee804e1180e0b9766f9e7b732b438505aae1..e94c69e49d355867a8eb270a14ce372cbff7425f 100644 (file)
@@ -121,7 +121,7 @@ struct value_ref_policy
 
 /* A gdb:;ref_ptr pointer to a struct value.  */
 
-typedef gdb::ref_ptr<struct value, value_ref_policy> value_ref_ptr;
+using value_ref_ptr = gdb::ref_ptr<struct value, value_ref_policy>;
 
 /* Note that the fields in this structure are arranged to save a bit
    of memory.  */
index 0cd3ba90a9151e01076d454842d8bbb7372f2335..a55c2c6dd2bb0cd487bed792f6733596d20ea189 100644 (file)
@@ -37,7 +37,7 @@
 #include "python/python.h"
 #include "python/python-internal.h"
 #else
-typedef int PyObject;
+using PyObject = int;
 #endif
 
 /* See varobj.h.  */
index 48a38df7480642bcf8eadbfd05f7b4aff28f2a50..2eddb5a9bab61a6526bab039ccf99ed3d75007eb 100644 (file)
@@ -252,7 +252,7 @@ vax_return_value (struct gdbarch *gdbarch, struct value *function,
 
 constexpr gdb_byte vax_break_insn[] = { 3 };
 
-typedef BP_MANIPULATION (vax_break_insn) vax_breakpoint;
+using vax_breakpoint = BP_MANIPULATION (vax_break_insn);
 \f
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
index 8e6e79a8160a1f3766ae81956e392ea31cf74341..cbfe026b23026b5b83bbca4195080494c4e4bb6c 100644 (file)
@@ -425,12 +425,12 @@ extern const int amd64_mappings[];
 class all_windows_threads_iterator
 {
 public:
-  typedef all_windows_threads_iterator self_type;
-  typedef windows_thread_info value_type;
-  typedef windows_thread_info *&reference;
-  typedef windows_thread_info **pointer;
-  typedef std::forward_iterator_tag iterator_category;
-  typedef int difference_type;
+  using self_type = all_windows_threads_iterator;
+  using value_type = windows_thread_info;
+  using reference = windows_thread_info *&;
+  using pointer = windows_thread_info **;
+  using iterator_category = std::forward_iterator_tag;
+  using difference_type = int;
 
   explicit all_windows_threads_iterator (all_non_exited_threads_iterator base_iter)
     : m_base_iter (base_iter)
index 56fb7cff57a0e72242c2a71d9dd929464ca7b21a..43305a10446e5bf299fa0e07661bddf041f77d67 100644 (file)
@@ -112,7 +112,7 @@ struct syscall_desc
   std::string alias;
 };
 
-typedef std::unique_ptr<syscall_desc> syscall_desc_up;
+using syscall_desc_up = std::unique_ptr<syscall_desc>;
 
 /* Structure of a syscall group.  */
 struct syscall_group_desc
@@ -131,7 +131,7 @@ struct syscall_group_desc
   std::vector<syscall_desc *> syscalls;
 };
 
-typedef std::unique_ptr<syscall_group_desc> syscall_group_desc_up;
+using syscall_group_desc_up = std::unique_ptr<syscall_group_desc>;
 
 /* Structure that represents syscalls information.  */
 struct syscalls_info
@@ -151,7 +151,7 @@ struct syscalls_info
   std::string my_gdb_datadir;
 };
 
-typedef std::unique_ptr<syscalls_info> syscalls_info_up;
+using syscalls_info_up = std::unique_ptr<syscalls_info>;
 
 /* Callback data for syscall information parsing.  */
 struct syscall_parsing_data
index 20cb849f1f1d1f83adb5c5c85adcb5170ec40def..56521aab2130424a41a603a3dd7118def39ac465 100644 (file)
@@ -499,7 +499,7 @@ xstormy16_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 constexpr gdb_byte xstormy16_break_insn[] = { 0x06, 0x0 };
 
-typedef BP_MANIPULATION (xstormy16_break_insn) xstormy16_breakpoint;
+using xstormy16_breakpoint = BP_MANIPULATION (xstormy16_break_insn);
 
 /* Given a pointer to a jump table entry, return the address
    of the function it jumps to.  Return 0 if not found.  */
index 50ad3be34b0fdbb3651eae8bd989def466537a8d..4426dc316ecb6da0fb5d81fb7ff128cc81ace401 100644 (file)
@@ -59,7 +59,7 @@
 #include "getopt.h"
 
 #ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
 #endif
 
 /* Sort of a hack... */
index fa8f50aba142c1395620bab16af4cfb6f0be3456..c0705588d609fd5672a7ed073babb2f4ea1cbbe5 100644 (file)
@@ -184,7 +184,7 @@ typedef enum
 } arm_hwbp_type;
 
 /* Type describing an ARM Hardware Breakpoint Control register value.  */
-typedef unsigned int arm_hwbp_control_t;
+using arm_hwbp_control_t = unsigned int;
 
 /* Structure used to keep track of hardware break-/watch-points.  */
 struct arm_linux_hw_breakpoint
index 3d4e4c69dd6f66c33292b8bc651224b2e5f91a09..5abd58725b720710cd94ddbd9602bbb29677050b 100644 (file)
 
 #include "gdb_proc_service.h"
 
-typedef struct ps_prochandle *gdb_ps_prochandle_t;
-typedef void *gdb_ps_read_buf_t;
-typedef const void *gdb_ps_write_buf_t;
-typedef size_t gdb_ps_size_t;
+using gdb_ps_prochandle_t = struct ps_prochandle *;
+using gdb_ps_read_buf_t = void *;
+using gdb_ps_write_buf_t = const void *;
+using gdb_ps_size_t = size_t;
 
 #ifdef HAVE_LINUX_REGSETS
 #define HAVE_REGSETS
index 4a35e5c41b6f1872d99d9237a5066b4a4f505d95..e99f34dfc6d2c93b4436fdd56972d6cca7602cb7 100644 (file)
@@ -69,7 +69,7 @@
 #endif
 
 #ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
 #endif
 
 #ifndef IN_PROCESS_AGENT
index e7484b27dbb7ef3a190ddcfcb76b8f56c868b581..788c1e38730b25a59e321906867deb5ffb0a0532 100644 (file)
@@ -167,7 +167,7 @@ public:
 
   /* The iterator type.  */
 
-  typedef char **iterator;
+  using iterator = char **;
 
   /* Return an iterator pointing to the start of the array.  */
 
index bd05604dd235fcb911b1f65fe2305c6149e377a3..c5c9c52b38d0b6b5f3ef777a69cac3a8ad041e93 100644 (file)
 #include "gdbsupport/offset-type.h"
 
 /* A byte from the program being debugged.  */
-typedef unsigned char gdb_byte;
+using gdb_byte = unsigned char;
 
 /* An address in the program being debugged.  Host byte order.  */
-typedef uint64_t CORE_ADDR;
+using CORE_ADDR = uint64_t;
 
 /* Like a CORE_ADDR, but not directly convertible.  This is used to
    represent an unrelocated CORE_ADDR.  */
@@ -35,8 +35,8 @@ DEFINE_OFFSET_TYPE (unrelocated_addr, CORE_ADDR);
 
 /* LONGEST must be at least as big as CORE_ADDR.  */
 
-typedef int64_t LONGEST;
-typedef uint64_t ULONGEST;
+using LONGEST = int64_t;
+using ULONGEST = uint64_t;
 
 /* The largest CORE_ADDR value.  */
 #define CORE_ADDR_MAX (~(CORE_ADDR) 0)
index ded7631ef1cce93a2fdf0f8026ca033c5ea7e20c..4021b475e7359bdee07f96501e1f6127ba5bb073 100644 (file)
@@ -52,11 +52,11 @@ public:
   struct rebind
   {
     /* A couple helpers just to make it a bit more readable.  */
-    typedef std::allocator_traits<A> traits_;
-    typedef typename traits_::template rebind_alloc<U> alloc_;
+    using traits_ = std::allocator_traits<A>;
+    using alloc_ = typename traits_::template rebind_alloc<U>;
 
     /* This is what we're after.  */
-    typedef default_init_allocator<U, alloc_> other;
+    using other = default_init_allocator<U, alloc_>;
   };
 
   /* Make the base allocator's construct method(s) visible.  */
index 4ae42d3a5920223bc101625ef00ab24dcc1a3da3..8c29f63a877fcc939dc1a6b552119af1fe845ec0 100644 (file)
@@ -70,7 +70,7 @@
 
    Corollary tasks are the creation and deletion of event sources.  */
 
-typedef void *gdb_client_data;
+using gdb_client_data = void *;
 typedef void (handler_func) (int, gdb_client_data);
 typedef void (timer_handler_func) (gdb_client_data);
 
index 899fa48b9ef6303d7dc5cfe13c05644cdbdd7a39..0680c920be3bdb479bec1f544d89120ac89ed156 100644 (file)
@@ -112,7 +112,7 @@ struct gdb_dir_deleter
 
 /* A unique pointer to a DIR.  */
 
-typedef std::unique_ptr<DIR, gdb_dir_deleter> gdb_dir_up;
+using gdb_dir_up = std::unique_ptr<DIR, gdb_dir_deleter>;
 
 /* Return true if the file NAME exists and is a regular file.
    If the result is false then *ERRNO_PTR is set to a useful value assuming
index ced10e46a716f01e4b4342860c7c835ad2df5532..70ac753fba31c98522f01ba35c2f05add1a33ad3 100644 (file)
@@ -75,7 +75,7 @@ public:
 
   DISABLE_COPY_AND_ASSIGN (format_pieces);
 
-  typedef std::vector<format_piece>::iterator iterator;
+  using iterator = std::vector<format_piece>::iterator;
 
   iterator begin ()
   {
index 00d2e26b63f0e32f9910432bf0a422f8fa834790..a211693017b754d534e9c26ccd476370138ec3aa 100644 (file)
@@ -29,7 +29,7 @@ struct dlclose_deleter
 
 /* A unique pointer that points to a dynamic library.  */
 
-typedef std::unique_ptr<void, dlclose_deleter> gdb_dlhandle_up;
+using gdb_dlhandle_up = std::unique_ptr<void, dlclose_deleter>;
 
 /* Load the dynamic library file named FILENAME, and return a handle
    for that dynamic library.  Throw an error if the loading fails for
index 75313ea92de7092af26f55c908e5cc72370ac279..c8a25d30ecfe4634f313a4305fee7ad932cd36e1 100644 (file)
@@ -31,7 +31,7 @@ struct htab_deleter
 };
 
 /* A unique_ptr wrapper for htab_t.  */
-typedef std::unique_ptr<htab, htab_deleter> htab_up;
+using htab_up = std::unique_ptr<htab, htab_deleter>;
 
 /* A wrapper for 'delete' that can used as a hash table entry deletion
    function.  */
index ccd1e3e92e743888103bec835c06bf8b0abddcf1..988655ff3b4745a5092099e16a70449e6ab9562e 100644 (file)
@@ -32,6 +32,6 @@ struct gdb_file_deleter
 
 /* A unique pointer to a FILE.  */
 
-typedef std::unique_ptr<FILE, gdb_file_deleter> gdb_file_up;
+using gdb_file_up = std::unique_ptr<FILE, gdb_file_deleter>;
 
 #endif /* GDBSUPPORT_GDB_FILE_H */
index 8622de727ea573c3fc38f6621a2828e2e49496d1..c7a240306b502d0022b492e28bb16918338a4470 100644 (file)
@@ -84,19 +84,19 @@ typedef enum
 } ps_err_e;
 
 #ifndef HAVE_LWPID_T
-typedef unsigned int lwpid_t;
+using lwpid_t = unsigned int;
 #endif
 
 #ifndef HAVE_PSADDR_T
-typedef void *psaddr_t;
+using psaddr_t = void *;
 #endif
 
 #ifndef HAVE_PRGREGSET_T
-typedef elf_gregset_t prgregset_t;
+using prgregset_t = elf_gregset_t;
 #endif
 
 #ifndef HAVE_PRFPREGSET_T
-typedef elf_fpregset_t prfpregset_t;
+using prfpregset_t = elf_fpregset_t;
 #endif
 
 /* This type is opaque in this interface.  It's defined by the user of
index 7669fa5a9f7db2dc7aa2e7bf925d52b4b9a5f77f..6a230f22a917ed9aba7d86b1faafe7eeb37398f7 100644 (file)
@@ -82,7 +82,7 @@ template<typename... T>
 class observable
 {
 public:
-  typedef std::function<void (T...)> func_type;
+  using func_type = std::function<void (T...)>;
 
 private:
   struct observer
index 6c5a2901c7ee4dd60f21cf03122eb6d57ec4dc6a..e580ade00c0a67e08bd5de018676694da3cc6b65 100644 (file)
@@ -108,7 +108,7 @@ class basic_safe_range
 {
 public:
 
-  typedef basic_safe_iterator<typename Range::iterator> iterator;
+  using iterator = basic_safe_iterator<typename Range::iterator>;
 
   explicit basic_safe_range (Range range)
     : m_range (range)
index e42c6d93bf41724a8dd1d94c37a1e99fbdea30f4..6fd8de53376a2468e19708b71645d9f41898bd55 100644 (file)
@@ -42,7 +42,7 @@ protected:
 
 /* A convenience typedef.  Users of make_scoped_restore declare the
    local RAII object as having this type.  */
-typedef const scoped_restore_base &scoped_restore;
+using scoped_restore = const scoped_restore_base &;
 
 /* An RAII-based object that saves a variable's value, and then
    restores it again when this object is destroyed. */
index b3ff01e37d0cf7ccebb92c86e2c704f286871432..a2ef21987bfcb299c65c312a1f949807d0aeb085 100644 (file)
@@ -131,7 +131,7 @@ struct tdesc_reg : tdesc_element
   }
 };
 
-typedef std::unique_ptr<tdesc_reg> tdesc_reg_up;
+using tdesc_reg_up = std::unique_ptr<tdesc_reg>;
 
 /* Declaration of a structure that holds information about one
    "compatibility" entry within a target description.  */
@@ -140,7 +140,7 @@ struct tdesc_compatible_info;
 
 /* A pointer to a single piece of compatibility information.  */
 
-typedef std::unique_ptr<tdesc_compatible_info> tdesc_compatible_info_up;
+using tdesc_compatible_info_up = std::unique_ptr<tdesc_compatible_info>;
 
 /* Return a vector of compatibility information pointers from the target
    description TARGET_DESC.  */
@@ -212,7 +212,7 @@ struct tdesc_type : tdesc_element
   }
 };
 
-typedef std::unique_ptr<tdesc_type> tdesc_type_up;
+using tdesc_type_up = std::unique_ptr<tdesc_type>;
 
 struct tdesc_type_builtin : tdesc_type
 {
@@ -313,7 +313,7 @@ struct tdesc_feature : tdesc_element
   }
 };
 
-typedef std::unique_ptr<tdesc_feature> tdesc_feature_up;
+using tdesc_feature_up = std::unique_ptr<tdesc_feature>;
 
 /* A deleter adapter for a target_desc.  There are different
    implementations of this deleter class in gdb and gdbserver because even
index a9188d1e10737ec321bc12158d14d8d6a4ea964e..638d3e2d08e5dc6235f18ed665f3a2d2f6943d9e 100644 (file)
@@ -98,7 +98,7 @@ private:
   size_t m_thread_count = 0;
 
   /* A convenience typedef for the type of a task.  */
-  typedef std::packaged_task<void ()> task_t;
+  using task_t = std::packaged_task<void ()>;
 
   /* The tasks that have not been processed yet.  An optional is used
      to represent a task.  If the optional is empty, then this means