From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from progateway7-pub.mail.pro1.eigbox.com (gproxy5-pub.mail.unifiedlayer.com [67.222.38.55]) by sourceware.org (Postfix) with ESMTPS id E42873858D20 for ; Fri, 14 Apr 2023 14:45:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E42873858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway7.mail.pro1.eigbox.com (Postfix) with ESMTP id 25D881003FACF for ; Fri, 14 Apr 2023 14:45:53 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id nKgTpglU0JHDXnKgTp4XF5; Fri, 14 Apr 2023 14:45:53 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=BLZ2EHcG c=1 sm=1 tr=0 ts=64396721 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=h-WdEM5I_VRj5f3C:21 a=dKHAf1wccvYA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=CCpqsmhAAAAA:8 a=3XkCgVVqz9vwb_04mdEA:9 a=hETi4f166VYBsFNJXLj8:22 a=ul9cdbp4aOFLsgKbc677:22 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=CjwViWqFYI7B2R/ZFYU+xZV2SB/QUEKgJocfRYydFNE=; b=PZup/qmVIHj/+pWFZ+mWQgVmK+ RjrZe0bgHrUNP4SlSg1EtCFdEbt6XnKlA1k/OG9hXW5ECaDafvhUS3hNpWyMbfUR6phtS8bOkNa0n t8vkcZqKYGl/oQHo6bYf3SxgT; Received: from 71-211-191-82.hlrn.qwest.net ([71.211.191.82]:49096 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pnKgS-0012ts-M3; Fri, 14 Apr 2023 08:45:52 -0600 From: Tom Tromey To: Aditya Kamath1 via Gdb-patches Cc: Tom Tromey , Ulrich Weigand , Aditya Kamath1 , Sangamesh Mallayya , "simon.marchi@efficios.com" Subject: Re: [PATCH] Fix call functions command bug in 64-bit programs for AIX and PC read in psymtab-symtab warning References: <049a54779f7280ddef6c2da12d0714023514dc9b.camel@de.ibm.com> <881bbbcc3646f5df9c2f334133907d3ca37149a6.camel@de.ibm.com> <48b9cc7b5cb4981f03fd459c4365242a11546c1e.camel@de.ibm.com> <87r0xsb4np.fsf@tromey.com> X-Attribution: Tom Date: Fri, 14 Apr 2023 08:45:51 -0600 In-Reply-To: (Aditya Kamath's message of "Fri, 14 Apr 2023 07:38:11 +0000") Message-ID: <87sfd24j4w.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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: 71.211.191.82 X-Source-L: No X-Exim-ID: 1pnKgS-0012ts-M3 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-191-82.hlrn.qwest.net (murgatroyd) [71.211.191.82]:49096 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3019.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> Aditya Kamath1 via Gdb-patches writes: >> warning: (Internal error: pc 0x100005a8 in read in psymtab, but not in symtab.) Hi. Thanks for the reply. > But the libc shared library that gives the printf () was compiled > using stabs. So now we have symtab created for symbols used by our > code and psymtab created for the shared library functions. Ok. This answers one of my questions. The stabs reader is on life support. If you want to track down and fix this bug, it's up to you. Actually I'm curious how important stabs are to your organization. I would like to deprecate stabs in gdb 14 and remove them entirely in gdb 15. However, they are still required for AIX, I suppose we'd keep the code around as long as you need. > The problem is the shared library functions in AIX do not have an > entry in the symtab. They have in psymtab. > Coming to solving this, I did try a few things in the last one > week. Let me tell you all what I did and where I failed. I tried to > add the symtab entry in the xcoffread.c file via record_minimal_symbol > () but then realised that after initial scan GDB code was not coming > here during execution. So it failed. I tried searching around > solib-aix.c file if I can get a hint to fix this but did not find any. gdb reads 3 kinds of symbols. "Minimal" symbols are essentially "linker symbols" -- in this case they aren't super relevant. That's why your investigation here didn't yield anything. Partial symbols are made by an initial scan of the debug info. (The DWARF reader doesn't use these any more but has its own analogous idea.) When more information is needed about a partial symbol, full symbols are read for the compilation unit. The warning you are seeing means that the partial and full symbol readers disagree. This is a bug somewhere. Maybe the fix is to ensure a symbol is made in the full reader. It's also possible that the fix is to not make a partial symbol. Finding the issue isn't always very easy, but basically what you want to do is inspect the point at which the relevant partial symbol is made; then expand the CU; and finally see why the full reader doesn't make a corresponding symbol. TBH all of this stuff is a design flaw. In the DWARF reader I hope to unify the paths so that this kind of mismatch is impossible. Tom