From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gIDpAdPa2GdQYxMAWB0awg (envelope-from ) for ; Mon, 17 Mar 2025 22:30:43 -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=siFa3rQl; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 02C381E100; Mon, 17 Mar 2025 22:30:43 -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 535441E05C for ; Mon, 17 Mar 2025 22:30:42 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 066E63858C39 for ; Tue, 18 Mar 2025 02:30:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 066E63858C39 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=siFa3rQl Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 17D74385801B for ; Tue, 18 Mar 2025 02:15:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17D74385801B 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 17D74385801B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264105; cv=none; b=op79xSt4PMGN9Mo4KsTXpfVrXR2ni5Io9OttryPDUgSN5ybqk6k1+O+mMRq7ZRV9TduIuoC3I32syyV/FmqJac+GI5qYUZXKLHuRH0A4a6XdCoLc80u23Kwf0NJg3UbJj6RBJkros9mKCiXDlahlwPuLwXwfR3yGrcNsMfgarLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742264105; c=relaxed/simple; bh=n0uv42PO9ifv2zhc9hxAYQFXXcwnspRyzi8R860figY=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=xTlVO2KTIhFXqLWaLuiPmaiC9LJbcozhbD+IsVvbILJgJoC0J0KAmlUuvLG3bRpfQ3BZMFc3wbrSYPXeYo6aPQ/WyBGsRLyR7a5TBlsMDKEg7A8SEbJdtwFwYxQCqXE5eLRLXEvd2I3ZsZA6TmEyM2l8mBYOFiLFLcKAdQAm4dk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17D74385801B Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id uIVAtkI7sAfjwuMTwtJ8qK; Tue, 18 Mar 2025 02:15:04 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uMTvtZtA2SasJuMTwtOBSJ; Tue, 18 Mar 2025 02:15:04 +0000 X-Authority-Analysis: v=2.4 cv=A4dqPbWG c=1 sm=1 tr=0 ts=67d8d728 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA:10 a=ItBw4LHWJt0A:10 a=iYy6sDDPGJvXyyN3RfIA: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=qt07+xOad/jMQ67vdISYH8YjOjkcVITn51l+3R90jOA=; b=siFa3rQlHic8GGO6Vo79PMje/d OIM38R+yQ3Qs+oAvZ88nfyy1CD0W0TFHicLozmIprkbQB+wCLLkuIa8M4SLJhuhjZRwABgfDW5ytD 7/EsRVWb0cMwTUqHwdic5ZvPf; 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 1tuMTv-00000002cIx-0oTM; Mon, 17 Mar 2025 20:15:03 -0600 From: Tom Tromey Date: Mon, 17 Mar 2025 20:15:05 -0600 Subject: [PATCH 12/19] Use gdb unordered set and map in Python layer MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250317-replace-std-stuff-v1-12-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: 1tuMTv-00000002cIx-0oTM 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: 13 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJkRZxgiaLZlkZDriEO5XQ3BchYCH8WMHTQPMtWpJhU5C2dnWUYfUvnURSlCXJV5C9/nJrfhKI9wbm/cR5G0WNvk39ZlXcK0v/9D35ZnXSZ18AmHybxr tXeaHIQzTpMJXEaCT0b/e4JDl37NXmVryt1947NEu0FSfRTOgTX5k10BJ3xvhBopUgy23vRVMJ5CDi4flKzdhNSrUtTCne9GA2Y= 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 a couple of files in the Python layer to use gdb:unordered_set and gdb::unordered_map. Another use exists but I think it is being handled by Jan's series. --- gdb/python/py-inferior.c | 4 ++-- gdb/python/py-registers.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 60bf56d17def31ce8e7a52dcc497f6e851b288b6..d11ca9e6506949441d1706a43136256328588d15 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -30,10 +30,10 @@ #include "py-event.h" #include "py-stopevent.h" #include "progspace-and-thread.h" -#include +#include "gdbsupport/unordered_map.h" using thread_map_t - = std::unordered_map>; + = gdb::unordered_map>; struct inferior_object { diff --git a/gdb/python/py-registers.c b/gdb/python/py-registers.c index 229dd62a826aac2beb2bf65770e6bd0c1ba73a87..75f99e510719f9bb163eefd8efe93f16a7da964e 100644 --- a/gdb/python/py-registers.c +++ b/gdb/python/py-registers.c @@ -22,7 +22,7 @@ #include "reggroups.h" #include "python-internal.h" #include "user-regs.h" -#include +#include "gdbsupport/unordered_map.h" /* Per-gdbarch data type. */ typedef std::vector> gdbpy_register_type; @@ -98,7 +98,7 @@ gdbpy_get_reggroup (const reggroup *reggroup) /* Map from GDB's internal reggroup objects to the Python representation. GDB's reggroups are global, and are never deleted, so using a map like this is safe. */ - static std::unordered_map> + static gdb::unordered_map> gdbpy_reggroup_object_map; /* If there is not already a suitable Python object in the map then -- 2.46.1