Message ID | 20250225-source-cache-hash-v1-0-f937ce22b0e9@tromey.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C43C3858C98 for <patchwork@sourceware.org>; Wed, 26 Feb 2025 01:10:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C43C3858C98 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=JKyUyNOz X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 533883858D26 for <gdb-patches@sourceware.org>; Wed, 26 Feb 2025 01:08:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 533883858D26 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 533883858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740532094; cv=none; b=BCDU2a3rKWGfS2NYFfw6zVZbMALVIPUmz2lkU+lEZv0NyP+OsLqp8dxtxpMvdsoTZG0QCXRLK9PT8wdR7/KTO48Lj9aIG3rLFB7K5eh2b0imZB0gdjY7/4TQr/iI7AS/fnGP7Fho2CwsMRmF4NneROxtfaaMLvgXksFfGM0hTd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740532094; c=relaxed/simple; bh=Y17HPADr77TNeOxDuk61NhxmZ+GpUm3KHmlS42ca0Tc=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=ZF7Gd9PiZrsChUjR/HViIDpf2WEHbofeMzlR3qfXSIAAMn9Ud5htNTvAIkPneH6NNLBVsFNcqhERLXtZV7KOypItSpu8NzyGqrdHiZEzFyVK9uEJKofcL04mTFDWdNP/R0/SMV3omm+8SmZWXtzYX9dkxh8/jR+JufUHcO7OOL4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 533883858D26 Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id mblFtjoZXiuzSn5uHtvPPp; Wed, 26 Feb 2025 01:08:14 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id n5uGtCf3CNMSln5uHtyHsl; Wed, 26 Feb 2025 01:08:13 +0000 X-Authority-Analysis: v=2.4 cv=K9DpHDWI c=1 sm=1 tr=0 ts=67be697d a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=T2h4t0Lz3GQA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=tfsLl729HYUABrst7B0A:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=v8JwLttOQECPbRETHO8+9Nk2aIyJXWUuGXM+P+VXFjM=; b=JKyUyNOzZtPTS1mbBCuaAhUJ3x C3GONWofjTVzREPoHwbFwJjoHxZUOcqKp4I3Yc0jFoUI7DczfyUF/gT1pHTmFjgZNr5ikUhIB7ViM dxVEdBdnODjMaYm39CkqlHk1D; Received: from 97-118-36-154.hlrn.qwest.net ([97.118.36.154]:33482 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 <tom@tromey.com>) id 1tn5uG-00000001I51-1nFZ; Tue, 25 Feb 2025 18:08:12 -0700 From: Tom Tromey <tom@tromey.com> Subject: [PATCH 00/10] Some simple changes to use gdb's unordered set and map Date: Tue, 25 Feb 2025 18:08:07 -0700 Message-Id: <20250225-source-cache-hash-v1-0-f937ce22b0e9@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAHdpvmcC/x3MMQ7CMAxA0atUnrFoXQUJroIYHGMaDyTIBoRU9 e4Exjf8v0KomwachhVc3xbWase0G0AK10XRrt1AI6WRKGG0l4uisBTFwlHwoNNRkqSZ5gy9e7j e7PN/ni/dmUMxO1cpv1NzW6zu7xxPddi2L0L+8SaDAAAA X-Change-ID: 20250225-source-cache-hash-6e19c5c5323b To: gdb-patches@sourceware.org Cc: Tom Tromey <tom@tromey.com> 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.118.36.154 X-Source-L: No X-Exim-ID: 1tn5uG-00000001I51-1nFZ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-36-154.hlrn.qwest.net (prentzel.local) [97.118.36.154]:33482 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHdj19oRO9Yi0exlmx3USJl6FEnYYMmJ/R054CB1Ha1gVzR2aZkaRcax92o+QiSL9VfpwImgqKz0Gfr6090nnrqJ/HzlvMLSG9rfC+C+h2LqYsY/EBRg bBsrRzCYzGcRKQv0/TEP1UJ12PQtXSRjmTxTuiQpIY86iEdb4TLABfttURUAhecSFN8j6GwGVRMutNTso+D+QYHD8gSZAwnp8zQ= X-Spam-Status: No, score=-3012.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Some simple changes to use gdb's unordered set and map
|
|
Message
Tom Tromey
Feb. 26, 2025, 1:08 a.m. UTC
This converts a few spots to use gdb::unordered_set or
gdb::unordered_map. I also noticed one spot where C++-ification
cleaned up the code, so that's included as well.
Regression tested on x86-64 Fedora 40.
Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (10):
Use gdb set and map in source_cache
Use gdb set and map in TUI
Use gdb::function_view in iterate_over_threads
Use gdb set and map in mi-main.c
Use gdb set and map in remote.c
Use gdb map in target-connection.c
Use gdb set in all_non_exited_process_targets
Use gdb set in dwarf2/aranges.c
Use gdb map in py-connection.c
Use gdb map in mi-cmds.c
gdb/aix-thread.c | 15 ++----
gdb/breakpoint.c | 16 ++----
gdb/dwarf2/aranges.c | 2 +-
gdb/fbsd-tdep.c | 10 ++--
gdb/gdbthread.h | 4 +-
gdb/infcmd.c | 12 ++---
gdb/infrun.c | 8 ++-
gdb/mi/mi-cmds.c | 4 +-
gdb/mi/mi-main.c | 114 ++++++++++++++++---------------------------
gdb/process-stratum-target.c | 4 +-
gdb/process-stratum-target.h | 5 +-
gdb/python/py-connection.c | 7 ++-
gdb/remote.c | 5 +-
gdb/sol-thread.c | 23 +++------
gdb/source-cache.h | 8 +--
gdb/target-connection.c | 5 +-
gdb/thread.c | 5 +-
gdb/tui/tui-layout.c | 4 +-
gdb/tui/tui-layout.h | 5 +-
19 files changed, 99 insertions(+), 157 deletions(-)
---
base-commit: 0ec9aa4ac33872e90c572f95b738c59aa7568b71
change-id: 20250225-source-cache-hash-6e19c5c5323b
Best regards,
Comments
On 2/25/25 8:08 PM, Tom Tromey wrote: > This converts a few spots to use gdb::unordered_set or > gdb::unordered_map. I also noticed one spot where C++-ification > cleaned up the code, so that's included as well. > > Regression tested on x86-64 Fedora 40. > > Signed-off-by: Tom Tromey <tom@tromey.com> I got this when applying the series... /home/smarchi/src/binutils-gdb/.git/rebase-apply/patch:257: indent with spaces. { /home/smarchi/src/binutils-gdb/.git/rebase-apply/patch:295: indent with spaces. { Those are in functions mi_cmd_exec_interrupt and mi_cmd_target_detach. Simon
On 2/26/25 12:06 PM, Simon Marchi wrote: > On 2/25/25 8:08 PM, Tom Tromey wrote: >> This converts a few spots to use gdb::unordered_set or >> gdb::unordered_map. I also noticed one spot where C++-ification >> cleaned up the code, so that's included as well. >> >> Regression tested on x86-64 Fedora 40. >> >> Signed-off-by: Tom Tromey <tom@tromey.com> > > I got this when applying the series... > > /home/smarchi/src/binutils-gdb/.git/rebase-apply/patch:257: indent with spaces. > { > /home/smarchi/src/binutils-gdb/.git/rebase-apply/patch:295: indent with spaces. > { > > Those are in functions mi_cmd_exec_interrupt and mi_cmd_target_detach. > > Simon My only real concern is in patch 6, where I think that switching to an unordered map could affect the order in the "info connections" output. But other than that: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> My only real concern is in patch 6, where I think that switching to an
Simon> unordered map could affect the order in the "info connections" output.
Simon> But other than that:
Simon> Approved-By: Simon Marchi <simon.marchi@efficios.com>
I dropped that one patch and I fixed all the other things you pointed
out, so I am going to check this in.
Tom