From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id 46CD7385842E for ; Sun, 5 Nov 2023 18:11:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46CD7385842E 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 46CD7385842E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699207892; cv=none; b=o4phtxcKzczjvEiH97zO69CA1swr2VE0bP5+gl1di7KTjk/wRqiWUku0PT3B3dFciWEDg2dQRIY+KL+jCK4o2+6eovp4Mkug6xRV5Aough/xvdnJivj4PSlq3T/oEUpI0rdnnZSi/jbw/g4X5DFyOGtfROgndB4Dry0CeG5Y8RY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699207892; c=relaxed/simple; bh=2WHez4+npPZgKAWRkPcWkgoEkDxIkPZCK+LBw3T0XqE=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=R/KUPJvkYqjJ9LwG0UmiBCFxmITFwP+q+vBTVM3DfzNHylmVm3WLm/HZUWiltaUCpQ6WnKTOPzoFtyZt6KYuNtC+S5sUOyJ2eshE8kfOliaVTLMFfyzoyt9b2jPbGXm8fk+jSo/6CwbdG6fBb9rjYKd4hDmMHGiY7pKVFdevoi4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5008a.ext.cloudfilter.net ([10.0.29.246]) by cmsmtp with ESMTPS id zK0EqK8O3L9AgzhasqXStm; Sun, 05 Nov 2023 18:11:30 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id zharqjdLqpPpmzharq74gq; Sun, 05 Nov 2023 18:11:29 +0000 X-Authority-Analysis: v=2.4 cv=MJVzJeVl c=1 sm=1 tr=0 ts=6547dad1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=mDV3o1hIAAAA:8 a=xidWkcqldO9mH9tVxSAA:9 a=QEXdDO2ut3YA:10 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc: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=0ed0FW55xWaGGNHeqAr/H9W0rsu+h0ArpqkeXH6herE=; b=ZIlpGBiTJ1FFlgxwB0LNJRCBgF /HGq3ND+mnrmsPqAta7uum54aO5nwBDl4CWY4SVsC0kzWzaylGljWYLV6+GmzTivbOj5WbCZNpyqu uFJtHCzSQAaPck/2XtP3BZBPe; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:51014 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1qzhaq-003Y66-2d for gdb-patches@sourceware.org; Sun, 05 Nov 2023 11:11:28 -0700 From: Tom Tromey Date: Sun, 05 Nov 2023 11:11:39 -0700 Subject: [PATCH v2 01/31] Introduce block-symbol.h MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231105-split-objfile-2023-bound-sym-october-v2-1-dbd2d158bbc3@tromey.com> References: <20231105-split-objfile-2023-bound-sym-october-v2-0-dbd2d158bbc3@tromey.com> In-Reply-To: <20231105-split-objfile-2023-bound-sym-october-v2-0-dbd2d158bbc3@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 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.77.73 X-Source-L: No X-Exim-ID: 1qzhaq-003Y66-2d X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net ([192.168.0.21]) [97.122.77.73]:51014 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: MS4xfPbnXF9TSlI/HFS7vkVVZ5B7sO/TrDNUHjyLa/Vo10nGcza78FTRC7vPeMgTjiRp/GO2ErFR6zaxE4+bpf3mskVzI1vBABr2IIPYRfCVn8cQk6ByZZF+ ktuNHStERtz9cOoU7MUJYbH0xxNoFE4K2Wdg6cHwx9yLAobvcKRSmcMMM8cjkkuBwdmx6xSMz/ApzwmWnWh6bIqCGvst/74hxOY= X-Spam-Status: No, score=-3024.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This adds a new header file, block-symbol.h. This is needed to break include cycles in later patches. --- gdb/block-symbol.h | 39 +++++++++++++++++++++++++++++++++++++++ gdb/symtab.h | 14 +------------- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/gdb/block-symbol.h b/gdb/block-symbol.h new file mode 100644 index 00000000000..35bc40c1986 --- /dev/null +++ b/gdb/block-symbol.h @@ -0,0 +1,39 @@ +/* The block_symbol type + + Copyright (C) 2023 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef GDB_BLOCK_SYMBOL_H +#define GDB_BLOCK_SYMBOL_H + +struct block; +struct symbol; + +/* Several lookup functions return both a symbol and the block in which the + symbol is found. This structure is used in these cases. */ + +struct block_symbol +{ + /* The symbol that was found, or NULL if no symbol was found. */ + struct symbol *symbol; + + /* If SYMBOL is not NULL, then this is the block in which the symbol is + defined. */ + const struct block *block; +}; + +#endif /* GDB_BLOCK_SYMBOL_H */ diff --git a/gdb/symtab.h b/gdb/symtab.h index 8dfc873b1c9..0b3ca3964b6 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -38,6 +38,7 @@ #include "gdb-demangle.h" #include "split-name.h" #include "frame.h" +#include "block-symbol.h" /* Opaque declarations. */ struct ui_file; @@ -1521,19 +1522,6 @@ struct symbol : public general_symbol_info, public allocate_on_obstack CORE_ADDR get_maybe_copied_address () const; }; -/* Several lookup functions return both a symbol and the block in which the - symbol is found. This structure is used in these cases. */ - -struct block_symbol -{ - /* The symbol that was found, or NULL if no symbol was found. */ - struct symbol *symbol; - - /* If SYMBOL is not NULL, then this is the block in which the symbol is - defined. */ - const struct block *block; -}; - /* Note: There is no accessor macro for symbol.owner because it is "private". */ -- 2.41.0