From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mOnBFrPY2GdQYxMAWB0awg (envelope-from ) for ; Mon, 17 Mar 2025 22:21: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=AXvIvN7y; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4D1091E100; Mon, 17 Mar 2025 22:21: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 CC7D71E05C for ; Mon, 17 Mar 2025 22:21:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F3783858406 for ; Tue, 18 Mar 2025 02:21:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F3783858406 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=AXvIvN7y Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id AC5BF3858C98 for ; Tue, 18 Mar 2025 02:15:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC5BF3858C98 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 AC5BF3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264100; cv=none; b=LPX+zwy6Zqw+XXo1De5VjK/GfZJ2uPeInLENu1VB1rBMoHs8Z+JviYbOKk3fDmuGH9yZCqd9CpM31Em+xQWX2y1uufxjY3AzmXt3DyKRSguujEkbK/PPEI1sVlNucQ46kYdLiTDt7C6hJ4aAzLN2qW4wKvMw3FkdVws8kRKRsAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264100; c=relaxed/simple; bh=GGFd2VJU9Zb0aKcEe233r+wdvW5gFaroBLDOZNULHXU=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=tim6unEEjVF03HTHvHQ9yScZep6gnbcomUnFh+LZma06iNByZEU/wipOProHGrDTTndVaCmOOUvQ85LqQaryI/SzPb7ofQ4tAyn1QXsjI4jk/qG9jE7LP/UGoG2LiNVpweJO8hb5HTyWNyqNOAhG+7c2cfEe+0oDPBz0g/8ufZQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC5BF3858C98 Received: from eig-obgw-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTPS id u6Z5tu6dvWuHKuMTrtodZT; Tue, 18 Mar 2025 02:14:59 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uMTqtyisHJ4PguMTrtRJ7T; Tue, 18 Mar 2025 02:14:59 +0000 X-Authority-Analysis: v=2.4 cv=ZaLWNdVA c=1 sm=1 tr=0 ts=67d8d723 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA:10 a=ItBw4LHWJt0A:10 a=dBtqliBbio2MP7xg6GkA: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=4jKuwxUn5t+pTBVIVw8WSu2TuZSN2YdTtX8JMxq8tmI=; b=AXvIvN7ye6k/xredizwGIHVOzs dpaDYJ0jIIRZjuVeEPDsYYZ48nRv+H+7CtMBbDG4Idi0KhEDBL02sIvZ2NGEAlgMMkK04ImgwKAfg L377c68FuQbkMzGrzLrFB7q9P; 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-0Lp6; Mon, 17 Mar 2025 20:14:58 -0600 From: Tom Tromey Date: Mon, 17 Mar 2025 20:14:54 -0600 Subject: [PATCH 01/19] Use gdb unordered set and map in corelow.c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250317-replace-std-stuff-v1-1-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-0Lp6 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: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJlec+Lc39yXnhxDcQXHVaeXHPFGSwQCTh0ZU5VIwaao0hJWLYKiBCs68RWfEOKztWYZSyrleEyrNOFK0jdheMPzdUeUoQsTkbn1UXldMNjmGZYnR58B JcVqlSg9dSPPCF8bRPQpai5MBLk12A1yoOvCb+dL3qeoIEvaV8XQK5B20n5bWaehi0aftNPZezsQ6K25ia1Dt652TAjVA4qYKfQ= 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 corelow.c to use gdb:unordered_set and gdb::unordered_map. --- gdb/corelow.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/corelow.c b/gdb/corelow.c index 59c1667710986fbffdb627e494e9ee3bc852febb..4662b5c6fc749e2688faeda72f9eb1032b600577 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -48,8 +48,8 @@ #include "gdbsupport/pathstuff.h" #include "gdbsupport/scoped_fd.h" #include "gdbsupport/x86-xstate.h" -#include -#include +#include "gdbsupport/unordered_map.h" +#include "gdbsupport/unordered_set.h" #include "cli/cli-cmds.h" #include "xml-tdesc.h" #include "memtag.h" @@ -125,11 +125,11 @@ struct mapped_file_info /* A type that maps a string to a build-id. */ using string_to_build_id_map - = std::unordered_map; + = gdb::unordered_map; /* A type that maps a build-id to a string. */ using build_id_to_string_map - = std::unordered_map; + = gdb::unordered_map; /* When loading a core file, the build-ids are extracted based on the file backed mappings. This map associates the name of a file that was @@ -405,11 +405,11 @@ core_target::build_file_mappings () std::vector regions; }; - std::unordered_map bfd_map; - std::unordered_set unavailable_paths; + gdb::unordered_map bfd_map; + gdb::unordered_set unavailable_paths; /* All files mapped into the core file. The key is the filename. */ - std::unordered_map mapped_files; + gdb::unordered_map mapped_files; /* See linux_read_core_file_mappings() in linux-tdep.c for an example read_core_file_mappings method. */ @@ -774,7 +774,7 @@ rename_vmcore_idle_reg_sections (bfd *abfd, inferior *inf) /* The set of all /NN numbers found. Needed so we can easily find unused numbers in the case that we need to rename some sections. */ - std::unordered_set all_lwpids; + gdb::unordered_set all_lwpids; /* A count of how many sections called .reg/0 we have found. */ unsigned zero_lwpid_count = 0; -- 2.46.1