From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.144.95]) by sourceware.org (Postfix) with ESMTPS id B0BDF395B01C for ; Wed, 11 Mar 2020 00:08:57 +0000 (GMT) Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 43A822B881 for ; Tue, 10 Mar 2020 19:08:57 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Bovhj3sSPAGTXBovhjVQXC; Tue, 10 Mar 2020 19:08:57 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=byV4cUJILPQGgJz3YW3S7wHFn7XrIWvKY1FUxXikKng=; b=YxY5EcDt2UUOQiTG6J+zm14O+o qIjP1eq2CJyZSaIxaU2n+bMGClXaM21gcciwAwkD/P4cYIrffVaha5MqkZlFJKRgWu3H/HsyC3ibV nd0Cy0W8kxFO3HDc2HU6ZCLrw; Received: from 184-96-250-69.hlrn.qwest.net ([184.96.250.69]:41258 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jBovg-001bLJ-O5; Tue, 10 Mar 2020 18:08:56 -0600 From: Tom Tromey To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH][gdb/symtab] Fix check-psymtab failure for inline function References: <20200309145237.GA20334@delia> X-Attribution: Tom Date: Tue, 10 Mar 2020 18:08:55 -0600 In-Reply-To: <20200309145237.GA20334@delia> (Tom de Vries's message of "Mon, 9 Mar 2020 15:52:39 +0100") Message-ID: <874kuv7nxk.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 184.96.250.69 X-Source-L: No X-Exim-ID: 1jBovg-001bLJ-O5 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 184-96-250-69.hlrn.qwest.net (bapiya) [184.96.250.69]:41258 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 00:09:00 -0000 >>>>> "Tom" == Tom de Vries writes: Tom> When loading the executable in gdb, we create a partial symbol for foo, but Tom> after expansion into a full symbol table no actual symbol is created, Tom> resulting in a maint check-psymtab failure: Tom> ... Tom> (gdb) maint check-psymtab Tom> Static symbol `foo' only found in inline.c psymtab Tom> ... Tom> Fix this by preventing the creation of this type of partial symbol. With this patch, if there is a function which is only inlined (there is no "out-line" copy), will "break function" still work? It seems to me that it wouldn't always, because there wouldn't be a partial symbol to match. Maybe it might work accidentally if the inline function appears in a CU that is already expanded, like main's. So the test would have to be an always-inline function that isn't used in main's CU. If it does work, then I wonder how, since my mental model is that all the paths to expansion require a matching partial symbol. If it doesn't work, then I think a different fix is needed. thanks, Tom