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
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. */
};
/* 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
};
/* 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. */
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.
/* 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
{
} 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
{ 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
{
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,
};
/* 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. */
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)
}
};
-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);
};
/* 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). */
};
/* 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,
/* 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,
/* 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
#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 */
/* 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. */
#include "target.h"
-typedef struct dcache_struct DCACHE;
+using DCACHE = struct dcache_struct;
/* Invalidate DCACHE. */
void dcache_invalidate (DCACHE *dcache);
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))
/* 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
/* 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;
The import in the following code:
namespace A
{
- typedef int B;
+ using B = int;
}
int main ()
/* 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. */
/* 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.
{
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. */
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. */
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;
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). */
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. */
};
/* 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
&& (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
#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
/* 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. */
#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;
/*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)
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. */
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. */
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,
/* 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. */
/* 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
};
/* 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. */
}
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. */
/* 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. */
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. */
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. */
/* 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. */
\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. */
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. */
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. */
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. */
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. */
/* 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
{
#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
{
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
{
};
/* 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
{
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. */
/* 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
/* 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. */
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)
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. */
/* 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,
/* 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. */
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)
/* 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. */
/* 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. */
/* 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
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)
/* 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 */
}
};
-typedef std::unique_ptr<procinfo, procinfo_deleter> procinfo_up;
+using procinfo_up = std::unique_ptr<procinfo, procinfo_deleter>;
enum { NOKILL, KILL };
CORE_ADDR k;
};
-typedef struct prologue_value pv_t;
+using pv_t = struct prologue_value;
/* Return the unknown prologue value --- { pvk_unknown, ?, ? }. */
#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>
#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
#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
};
/* 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.
/* 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);
}
};
-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 */
/* 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. */
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
/* 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. */
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. */
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. */
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
{
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. */
#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
}
};
-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)
#include <algorithm>
#ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
#endif
/* For "set tcp" and "show tcp". */
/* Terminal state pointer. This is specific to each type of
interface. */
-typedef void *serial_ttystate;
+using serial_ttystate = void *;
struct serial;
struct serial_ops;
#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
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. */
# 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
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. */
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
/* 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"
};
/* 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. */
/* 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 ();
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 {};
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. */
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. */
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
/* 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
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)
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. */
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.
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. */
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);
= 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. */
/* 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. */
#include "python/python.h"
#include "python/python-internal.h"
#else
-typedef int PyObject;
+using PyObject = int;
#endif
/* See varobj.h. */
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. */
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)
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
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
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
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. */
#include "getopt.h"
#ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
#endif
/* Sort of a hack... */
} 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
#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
#endif
#ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+using socklen_t = int;
#endif
#ifndef IN_PROCESS_AGENT
/* The iterator type. */
- typedef char **iterator;
+ using iterator = char **;
/* Return an iterator pointing to the start of the array. */
#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. */
/* 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)
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. */
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);
/* 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
DISABLE_COPY_AND_ASSIGN (format_pieces);
- typedef std::vector<format_piece>::iterator iterator;
+ using iterator = std::vector<format_piece>::iterator;
iterator begin ()
{
/* 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
};
/* 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. */
/* 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 */
} 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
class observable
{
public:
- typedef std::function<void (T...)> func_type;
+ using func_type = std::function<void (T...)>;
private:
struct observer
{
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)
/* 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. */
}
};
-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. */
/* 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. */
}
};
-typedef std::unique_ptr<tdesc_type> tdesc_type_up;
+using tdesc_type_up = std::unique_ptr<tdesc_type>;
struct tdesc_type_builtin : tdesc_type
{
}
};
-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
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