From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mGPQM//X2GfGYhMAWB0awg (envelope-from ) for ; Mon, 17 Mar 2025 22:18:39 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Tp+WgdKw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D11911E100; Mon, 17 Mar 2025 22:18:39 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 435E71E05C for ; Mon, 17 Mar 2025 22:18:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA8CE3858406 for ; Tue, 18 Mar 2025 02:18:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA8CE3858406 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Tp+WgdKw Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 934FB3858CDB for ; Tue, 18 Mar 2025 02:15:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 934FB3858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 934FB3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264100; cv=none; b=n0kGPmaZYmR+kA5S3Qqit5lz2bdxT+yM4EHs5X5dvzjxKG0jDOoqNBZBITqN726AnG94caNKCEdz5c/y7DO1YYoquYAmONm+9vKy43M4YQMDWciNnF3BL5/8lWV2rqV6d3RMUt3LkXbl0LHNB+eIFfASStQoFVCetKr8mK7h+4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264100; c=relaxed/simple; bh=dup375PDAJY2Id+InqRMNeqtp0zMT2sQjmZx31IJGBo=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=N8eElGtESHXLLfs9dDYAN+NinRcl0Y+g57LokLksocTbcgEfIoMBmJUa/tDwWd/wCEBhLxmKAa7/UMbVBSOIYCd4mTDCRxDcqclDC3299g5mVa7fGRzslteYLTD1KDO8YuJJa5exzwGF1CsahO+BW1dhBZmvAx5SgLMmf13jQ8Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 934FB3858CDB Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTPS id uKNItS9VOzZPauMTst8tR8; Tue, 18 Mar 2025 02:15:00 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uMTrt2nDeaBenuMTrt6PXZ; Tue, 18 Mar 2025 02:14:59 +0000 X-Authority-Analysis: v=2.4 cv=I7xjRsgg c=1 sm=1 tr=0 ts=67d8d723 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA:10 a=ItBw4LHWJt0A:10 a=jD563CIPeVfMyGcmb10A:9 a=QEXdDO2ut3YA:10 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=epwAln3HZRhyG/EKQAaNBCS2IcNVUES0j6Tr4OA0Wr8=; b=Tp+WgdKwdbQeIrF6pkf4E0h0f2 1lLUIUUhTZrBcVv4ie1Qysz3h/3pFXDP0w+OQs7CD99gGIoyySL+hZUJrQsl3aHLdy5bkM96YOz1e PbnpT2hzheDw/smNinHEQ7lxD; Received: from 97-122-96-32.hlrn.qwest.net ([97.122.96.32]:36240 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1tuMTq-00000002cIx-3Ot9; Mon, 17 Mar 2025 20:14:58 -0600 From: Tom Tromey Date: Mon, 17 Mar 2025 20:14:56 -0600 Subject: [PATCH 03/19] Use gdb unordered map in dictionary.c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250317-replace-std-stuff-v1-3-7ba4ee88e218@tromey.com> References: <20250317-replace-std-stuff-v1-0-7ba4ee88e218@tromey.com> In-Reply-To: <20250317-replace-std-stuff-v1-0-7ba4ee88e218@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.96.32 X-Source-L: No X-Exim-ID: 1tuMTq-00000002cIx-3Ot9 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-96-32.hlrn.qwest.net (prentzel.local) [97.122.96.32]:36240 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHJqSVNBCl7oMzPIjwmUVT2VN3P/p7yj1Vo2k0DNmqpNqBcgtfcpwDSK8Tcl75CS8qyRsB1Xl99y2DAWFnNL3gn+9e9kB+uGiYckkQvOaxe8DpyhBFaP QgzMh+lIMtLXTdmrpqVobPQEzjGTp8x2d5pEqiBo/CUq/++Guc5vfi5vbUrVyO+suRJza9XEP3WTfMM43kQBK01/CmTlS1YuXv8= 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 This changes dictionary.c to use gdb::unordered_map. --- gdb/dictionary.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/dictionary.c b/gdb/dictionary.c index f617b8f967f87b9c177d5470158b02c91986e531..f673877338c9b012ed9b7a149e6086975604a5bf 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -26,7 +26,7 @@ #include "buildsym.h" #include "dictionary.h" #include "gdbsupport/gdb-safe-ctype.h" -#include +#include "gdbsupport/unordered_map.h" #include "language.h" /* This file implements dictionaries, which are tables that associate @@ -917,10 +917,10 @@ struct multidictionary /* A helper function to collate symbols on the pending list by language. */ -static std::unordered_map> +static gdb::unordered_map> collate_pending_symbols_by_language (const struct pending *symbol_list) { - std::unordered_map> nsyms; + gdb::unordered_map> nsyms; for (const pending *list_counter = symbol_list; list_counter != nullptr; list_counter = list_counter->next) @@ -943,7 +943,7 @@ mdict_create_hashed (struct obstack *obstack, { struct multidictionary *retval = XOBNEW (obstack, struct multidictionary); - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); /* Loop over all languages and create/populate dictionaries. */ @@ -988,7 +988,7 @@ mdict_create_linear (struct obstack *obstack, { struct multidictionary *retval = XOBNEW (obstack, struct multidictionary); - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); /* Loop over all languages and create/populate dictionaries. */ @@ -1132,7 +1132,7 @@ void mdict_add_pending (struct multidictionary *mdict, const struct pending *symbol_list) { - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); for (const auto &pair : nsyms) -- 2.46.1