From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Abu0A0LsMGq/pAkAWB0awg (envelope-from ) for ; Tue, 16 Jun 2026 02:25:06 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0ADD91E098; Tue, 16 Jun 2026 02:25:06 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3CCC81E024 for ; Tue, 16 Jun 2026 02:25:05 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6D1A48FBCA7 for ; Tue, 16 Jun 2026 06:25:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6D1A48FBCA7 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 6D01A48FBCA4 for ; Tue, 16 Jun 2026 06:23:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D01A48FBCA4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6D01A48FBCA4 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781591004; cv=none; b=V3wbSsjhfXx577I2ETyp4lzyhB9EMUClXD5tG4jXD9pWoOk2rFwarkt2HtCBLI2GYd2k6H6g6LVuuyEBaSlIa6lNXUa7rSFFVrW1ZbPCUiJ5r3/hqxTTXZrVppupBg9WHpbW8HHtaXAQJD+KYhXnG/hkzy2JxeVkZJDhYTDuTbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781591004; c=relaxed/simple; bh=ubjTx2Ek2nde4MwJg8F8JaReYBEObVj+f0FljApBxdE=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=LhJ+nO0s2Wchv2PvXXQfd3+P+hfUFjrGlfSsqddrPLVpMoE34Gi3d9gz7x6heQ98QXD7NOVkTxHMXGdfQIc1utQmv668BJQrcozNDL/daMG1OkR7pQEB4KNIuMFZqmyVQe54cqWB/QbKpaN/9IKLqycHaEm8yZcNGosVJWmDirs= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=AgrSCBfW; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=BcoUK/rV DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D01A48FBCA4 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C2FD46CB02 for ; Tue, 16 Jun 2026 06:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781590978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8cP/aHkOcHeY0W4Ww2AfAkqk0E3EZXkxXACJxGD8qFs=; b=AgrSCBfW5GYECYKPwQrDtCB5X0UIsGK2pH+E4kOzv2mn6WCp8zN+h2wXQPsXdxHcDbTkLC xr7J+JV31HORULoJGhmABazWnQ/PfPwXbEJk0A4/lcO+RScftoVwvodwdfz5QktSTlbkRk ktYI4mbvFr0UsiTG46s3AlXD9iHuNuA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781590978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8cP/aHkOcHeY0W4Ww2AfAkqk0E3EZXkxXACJxGD8qFs=; b=BcoUK/rVDSXsuInIuZ8OIMoFFU2dQxhpgvFkBc8nyzFVFGJfyPrWWXZXs/bSDN+DrRQSmM grlaiSznDqs9sRBQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=AgrSCBfW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="BcoUK/rV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781590978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8cP/aHkOcHeY0W4Ww2AfAkqk0E3EZXkxXACJxGD8qFs=; b=AgrSCBfW5GYECYKPwQrDtCB5X0UIsGK2pH+E4kOzv2mn6WCp8zN+h2wXQPsXdxHcDbTkLC xr7J+JV31HORULoJGhmABazWnQ/PfPwXbEJk0A4/lcO+RScftoVwvodwdfz5QktSTlbkRk ktYI4mbvFr0UsiTG46s3AlXD9iHuNuA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781590978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8cP/aHkOcHeY0W4Ww2AfAkqk0E3EZXkxXACJxGD8qFs=; b=BcoUK/rVDSXsuInIuZ8OIMoFFU2dQxhpgvFkBc8nyzFVFGJfyPrWWXZXs/bSDN+DrRQSmM grlaiSznDqs9sRBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AC8DF779A8 for ; Tue, 16 Jun 2026 06:22:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MGzHKMLrMGr8fAAAD6G6ig (envelope-from ) for ; Tue, 16 Jun 2026 06:22:58 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 05/12] [gdb] Convert template typedefs to using Date: Tue, 16 Jun 2026 08:22:50 +0200 Message-ID: <20260616062257.3164438-6-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260616062257.3164438-1-tdevries@suse.de> References: <20260616062257.3164438-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Queue-Id: C2FD46CB02 X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received,2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid, suse.de:dkim, imap1.dmz-prg2.suse.org:rdns, imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Convert "typedef foo<...> bar" to "using bar = foo<...>". Generated by a script written by Claude Code. --- gdb/ada-lang.h | 4 ++-- gdb/breakpoint.h | 4 ++-- gdb/compile/compile-c-support.c | 20 +++++++++++--------- gdb/dwarf2/cooked-index-shard.h | 4 ++-- gdb/dwarf2/read-gdb-index.h | 11 +++++------ gdb/gdbtypes.c | 4 ++-- gdb/inferior.h | 8 ++++---- gdb/mi/mi-symbol-cmds.c | 4 ++-- gdb/stack.h | 4 ++-- gdb/target-descriptions.h | 4 ++-- gdb/tracefile.c | 4 ++-- gdb/xml-support.h | 6 +++--- gdbserver/netbsd-low.cc | 12 ++++++------ gdbsupport/gdb_splay_tree.h | 4 ++-- 14 files changed, 47 insertions(+), 46 deletions(-) diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index cd2fce73d61..85470e2e8d1 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -372,8 +372,8 @@ extern struct ada_task_info *ada_get_task_info_from_ptid (ptid_t ptid); extern int ada_get_task_number (thread_info *thread); -typedef gdb::function_view - ada_task_list_iterator_ftype; +using ada_task_list_iterator_ftype + = gdb::function_view; extern void iterate_over_live_ada_tasks (ada_task_list_iterator_ftype iterator); diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 7149211a055..722d75390fa 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -537,8 +537,8 @@ struct bp_location_ref_policy }; /* A gdb::ref_ptr that has been specialized for bp_location. */ -typedef gdb::ref_ptr - bp_location_ref_ptr; +using bp_location_ref_ptr + = gdb::ref_ptr; /* The possible return values for print_bpstat, print_it_normal, print_it_done, print_it_noop. */ diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index f2b98ab5e2f..f18708846ec 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -649,15 +649,17 @@ class compile_program /* The types used for C and C++ program computations. */ -typedef compile_program c_compile_program; - -typedef compile_program cplus_compile_program; +using c_compile_program + = compile_program; + +using cplus_compile_program + = compile_program; /* The compute_program method for C. */ diff --git a/gdb/dwarf2/cooked-index-shard.h b/gdb/dwarf2/cooked-index-shard.h index aff82fad184..84c37958c83 100644 --- a/gdb/dwarf2/cooked-index-shard.h +++ b/gdb/dwarf2/cooked-index-shard.h @@ -65,8 +65,8 @@ class cooked_index_shard friend class cooked_index; /* A simple range over part of m_entries. */ - typedef iterator_range::const_iterator> - range; + using range + = iterator_range::const_iterator>; /* Return a range of all the entries. */ range all_entries () const diff --git a/gdb/dwarf2/read-gdb-index.h b/gdb/dwarf2/read-gdb-index.h index cf703ed01c1..56e112c6cbb 100644 --- a/gdb/dwarf2/read-gdb-index.h +++ b/gdb/dwarf2/read-gdb-index.h @@ -43,12 +43,11 @@ struct objfile; /* Callback types for dwarf2_read_gdb_index. */ -typedef gdb::function_view - (objfile *, dwarf2_per_bfd *)> - get_gdb_index_contents_ftype; -typedef gdb::function_view - (objfile *, dwz_file *)> - get_gdb_index_contents_dwz_ftype; +using get_gdb_index_contents_ftype + = gdb::function_view(objfile *, + dwarf2_per_bfd *)>; +using get_gdb_index_contents_dwz_ftype + = gdb::function_view(objfile *, dwz_file *)>; /* Read .gdb_index. If everything went ok, initialize the "quick" elements of all the CUs and return true. Otherwise, return diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index eac5cb87fe2..d1a2914e1e6 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5618,8 +5618,8 @@ append_composite_type_field (struct type *t, const char *name, hash the contents of an mpq_t; so it's a bit of a pain to hash-cons them. If we did do this, they could be moved to the per-BFD and shared across objfiles. */ -typedef std::vector> - fixed_point_type_storage; +using fixed_point_type_storage + = std::vector>; /* Key used for managing the storage of fixed-point type info. */ static const struct registry::key diff --git a/gdb/inferior.h b/gdb/inferior.h index 11f5b25ec26..5c7a52319e7 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -92,8 +92,8 @@ struct infcall_suspend_state_deleter }; /* A unique_ptr specialization for infcall_suspend_state. */ -typedef std::unique_ptr - infcall_suspend_state_up; +using infcall_suspend_state_up + = std::unique_ptr; extern infcall_suspend_state_up save_infcall_suspend_state (); @@ -108,8 +108,8 @@ struct infcall_control_state_deleter }; /* A unique_ptr specialization for infcall_control_state. */ -typedef std::unique_ptr - infcall_control_state_up; +using infcall_control_state_up + = std::unique_ptr; extern infcall_control_state_up save_infcall_control_state (); diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c index d7535c51d2a..993a647a9c9 100644 --- a/gdb/mi/mi-symbol-cmds.c +++ b/gdb/mi/mi-symbol-cmds.c @@ -241,8 +241,8 @@ mi_info_functions_or_variables (domain_search_flags kind, } /* Type for an iterator over a vector of module_symbol_search results. */ -typedef std::vector::const_iterator - module_symbol_search_iterator; +using module_symbol_search_iterator + = std::vector::const_iterator; /* Helper for mi_info_module_functions_or_variables. Display the results from ITER up to END or until we find a symbol that is in a different diff --git a/gdb/stack.h b/gdb/stack.h index ad2700b59a7..48096a29286 100644 --- a/gdb/stack.h +++ b/gdb/stack.h @@ -24,8 +24,8 @@ gdb::unique_xmalloc_ptr find_frame_funname (const frame_info_ptr &frame, enum language *funlang, struct symbol **funcp); -typedef gdb::function_view - iterate_over_block_arg_local_vars_cb; +using iterate_over_block_arg_local_vars_cb + = gdb::function_view; void iterate_over_block_arg_vars (const struct block *block, iterate_over_block_arg_local_vars_cb cb); diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h index 39b56d80e5f..c9cc743386d 100644 --- a/gdb/target-descriptions.h +++ b/gdb/target-descriptions.h @@ -93,8 +93,8 @@ struct tdesc_arch_data_deleter /* A unique pointer specialization that holds a target_desc. */ -typedef std::unique_ptr - tdesc_arch_data_up; +using tdesc_arch_data_up + = std::unique_ptr; /* Update GDBARCH to use the TARGET_DESC for registers. TARGET_DESC may be GDBARCH's target description or (if GDBARCH does not have diff --git a/gdb/tracefile.c b/gdb/tracefile.c index c4ebb823126..a9921594727 100644 --- a/gdb/tracefile.c +++ b/gdb/tracefile.c @@ -52,8 +52,8 @@ struct trace_file_writer_deleter /* A unique_ptr specialization for trace_file_writer. */ -typedef std::unique_ptr - trace_file_writer_up; +using trace_file_writer_up + = std::unique_ptr; /* Save tracepoint data to file named FILENAME through WRITER. WRITER determines the trace file format. If TARGET_DOES_SAVE is non-zero, diff --git a/gdb/xml-support.h b/gdb/xml-support.h index c840dd3a082..95e21499345 100644 --- a/gdb/xml-support.h +++ b/gdb/xml-support.h @@ -142,9 +142,9 @@ enum gdb_xml_element_flag fixed offsets can be used to find any non-optional attributes as long as no optional attributes precede them. */ -typedef void (gdb_xml_element_start_handler) - (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, - void *user_data, std::vector &attributes); +using gdb_xml_element_start_handler + = void (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, + void *user_data, std::vector &attributes); /* A handler called at the end of an element. diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc index ddbf0b97f54..326b4d55860 100644 --- a/gdbserver/netbsd-low.cc +++ b/gdbserver/netbsd-low.cc @@ -741,8 +741,8 @@ template int get_phdr_phnum_from_proc_auxv (const pid_t pid, CORE_ADDR *phdr_memaddr, int *num_phdr) { - typedef typename std::conditional::type auxv_type; + using auxv_type = typename std::conditional::type; const size_t auxv_size = sizeof (auxv_type); const size_t auxv_buf_size = 128 * sizeof (auxv_type); @@ -791,8 +791,8 @@ template static CORE_ADDR get_dynamic (const pid_t pid) { - typedef typename std::conditional::type phdr_type; + using phdr_type = typename std::conditional::type; const int phdr_size = sizeof (phdr_type); CORE_ADDR phdr_memaddr; @@ -853,8 +853,8 @@ template static CORE_ADDR get_r_debug (const pid_t pid) { - typedef typename std::conditional::type dyn_type; + using dyn_type = typename std::conditional::type; const int dyn_size = sizeof (dyn_type); unsigned char buf[sizeof (dyn_type)]; /* The larger of the two. */ CORE_ADDR map = -1; diff --git a/gdbsupport/gdb_splay_tree.h b/gdbsupport/gdb_splay_tree.h index a72b515364a..62302d04b2f 100644 --- a/gdbsupport/gdb_splay_tree.h +++ b/gdbsupport/gdb_splay_tree.h @@ -36,7 +36,7 @@ struct splay_tree_deleter /* A unique pointer to a splay tree. */ -typedef std::unique_ptr - gdb_splay_tree_up; +using gdb_splay_tree_up + = std::unique_ptr; #endif /* GDBSUPPORT_GDB_SPLAY_TREE_H */ -- 2.51.0