From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id CED5B38582BE for ; Mon, 29 Jan 2024 18:50:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CED5B38582BE 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 CED5B38582BE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706554261; cv=none; b=vmeb2+fAEzIux8JMqj6l738f10GhRoggTuQrkMX7J4rnfBGENtwsJysRfjBSXZkH85V6aj7KTq8eyBuHxONSkjaTCRLu9lz3qnm82gds77IL+VmTKVrkXFNhJxw9odVHsTa31n6SymQuCGWBmozPkZ4vONeMFcHsB93eocREQiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706554261; c=relaxed/simple; bh=NA8d7jmgJ6C4HTp/XO3827dSqv4qXP4QfZS9JjWakmw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mwhQ3fesRhyl2d0V8ONmYWccbt3o7zUdjC2FmkMq8vHUbMRqgrt85jW5DO8xiurKamQW4+PrE+ybnDw9ukdK+vnVp/fzod4Tki99P0z4Qeqk9pn4oqlEsGaY1nvNxKv7RNePW0l+K3eBbTvKG7UIBbDhV/r8LSf2CeNLsZl1yqs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5005a.ext.cloudfilter.net ([10.0.29.234]) by cmsmtp with ESMTPS id UVgtrPP2iTHHuUWihriJid; Mon, 29 Jan 2024 18:50:59 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id UWigrTfMrfs4hUWigr8DGV; Mon, 29 Jan 2024 18:50:59 +0000 X-Authority-Analysis: v=2.4 cv=Q6TBXq6a c=1 sm=1 tr=0 ts=65b7f393 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=VnNF1IyMAAAA:8 a=MOC9A7y9y9CKJsN1KXMA:9 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=zmWc5N5CRmn/S8LVunIQIz/zs5/9BEAxreZuJ9Ws5lg=; b=b++KeILF+Zza2gMWfkv6umNjE6 TA3TLzyxoXkzrBcmo/55OuHbdC+cMgRqqSmUkroyON8OTD5IEI8bnUctQ7oHJlblTmXPqIOdARDo+ 06R32E5TJY42gemFtAKSgqAUf; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:35872 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rUWif-003WfF-0D; Mon, 29 Jan 2024 11:50:57 -0700 From: Tom Tromey To: Carl Love Cc: Andreas Schwab , gdb-patches@sourceware.org Subject: Re: Help with break in printf function References: <4c92aa19-ca28-44e4-97c6-3b0b4d9da512@linux.ibm.com> <87cytn2ko0.fsf@linux-m68k.org> X-Attribution: Tom Date: Mon, 29 Jan 2024 11:50:55 -0700 In-Reply-To: (Carl Love's message of "Mon, 29 Jan 2024 08:41:39 -0800") Message-ID: <878r48gei8.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (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: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rUWif-003WfF-0D X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net (murgatroyd) [97.122.68.157]:35872 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGaAEooxLoVBIY8WQEbvB823SFijxh7A00WqUltaMngedozETWUbb9yRzRqHNgqxB0bcwiS1qV4eVHPKvrYGO626yt6F0VIIWZFMEledzM7m+8osMeoz s8/sY+h+GksuDysRy5Q8u1MBr3iZIT6YUVtDsPcLRnrRz7oj+6OThGrVwRver63c3Zrm5167wSAffaieB/zanO73vS4TTE64+58= X-Spam-Status: No, score=-3016.5 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,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: >>>>> "Carl" == Carl Love writes: Carl> Yes, I was guessing there something going on in the compiler with Carl> regards to the ieee128-printf which GDB needs to know about. The Carl> GDB dwarf info Carl> Relocation section '.rela.plt' at offset 0x498 contains 4 entries: Carl> Offset Info Type Sym. Value Sym. Name + Addend Carl> 000010020010 000100000015 R_PPC64_JMP_SLOT 0000000000000000 __libc_start_main@GLIBC_2.34 + 0 Carl> 000010020018 000300000015 R_PPC64_JMP_SLOT 0000000000000000 signal@GLIBC_2.17 + 0 Carl> 000010020020 000400000015 R_PPC64_JMP_SLOT 0000000000000000 __printfieee128@GLIBC_2.32 + 0 Carl> 000010020028 000500000015 R_PPC64_JMP_SLOT 0000000000000000 __gmon_start__ + 0 Carl> has the printfieee128 function listed. This looks like ELF symbols, not DWARF. Carl> I was trying to figure out where/how GDB processes the DWARF Carl> information. The first thing. we would need to have a check when Carl> reading the sym name to flag that the string Carl> __printfieee128@GLIBC* was seen. Then implement the magic, as you Carl> said, to associate it with the printf function to have the Carl> breakpoint changed from printf to _printfieee128@GLIBC. I have no Carl> idea how to go about doing that??? Any ideas how one might try to Carl> do that? I guess I wonder what the other issues might be though. For instance, if "printf" is actually "__printfieee128", then is there some setting that might cause "printf" to call some other function? Anyway, in DWARF it is fine to have multiple symbols with the same name that point to different addresses; or multiple symbols with different names pointing to the same address. So you could arrange (somehow) for "printf" to point to __ieee128_printf as well as whatever else. Then "break printf" in gdb would set a breakpoint at all of them. Tom