From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FlfoJR2h3mioiRwAWB0awg (envelope-from ) for ; Thu, 02 Oct 2025 11:58:21 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=KNnCMrxX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8A7131E0B6; Thu, 02 Oct 2025 11:58:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0B3771E047 for ; Thu, 02 Oct 2025 11:58:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 812053858436 for ; Thu, 2 Oct 2025 15:58:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 812053858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1759420699; bh=A2r/+yI5GCO7bBUoqPViBlbBzANpFHqd5sBAIEBEzqg=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=KNnCMrxXbXJGRoNwSWVChI3hfUsmWDMYbg/PzusuwAN5c8MqR3+5hifdBtz6D6lrJ vRVJzHPmQ46KtjprRQtJbcwa/NdRk99+uTtUs92g54cWhzU48/mKXYwKpWbu7umY0u H07bcVG1m/L15ZiCVbtdXaObuRwMjNOCHZjfYY3o= Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by sourceware.org (Postfix) with ESMTPS id 26FC93858D20 for ; Thu, 2 Oct 2025 15:57:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26FC93858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 26FC93858D20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759420651; cv=none; b=P8vrpkIrDa7nzHHx8T/NmlNRj5Y9VFZmKzUNy/FzGnM4I+Y/VnPzMDaKQAgySmi4gPFrH50LscdB4ohhWcX36aRoWwKUsjsA62lcYd8qrfll9zgge/8eeJn82ttGKR4ktwmYjyeLvuHOMmPa4nR6NFlYdOH5jr3DVYXdDH5bd8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759420651; c=relaxed/simple; bh=/jaTRU4s5TlsMRc+iUBPsCLAhIvRy7cuHEoyMCm1XSk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=B3js+CwLBmUMGz/Hh5UqzsJBztWnFyYMcAQy4+iAPsFlBE7MnnMzZSBkGsmMj+/10M4hBJg3hFRIpgwZaS/Zl+3qeHL8RSVMR9E/1cf99JZEosQsf/nG/RCvA+7ywI2wK9bTpVVZKmQmHfTtKyF9HGNGeXCyYvp8vxH/5ESTVSc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26FC93858D20 Received: by mail-io1-xd42.google.com with SMTP id ca18e2360f4ac-9399ddb3ffeso77521339f.3 for ; Thu, 02 Oct 2025 08:57:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759420644; x=1760025444; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=A2r/+yI5GCO7bBUoqPViBlbBzANpFHqd5sBAIEBEzqg=; b=wQwkfbQnicqlFmMzu3DRcLNbBn5zLfTNfU7R17s2Wl1C7aMd1ZKDo/84A2nF1/7pki hhLRkRaXoupdewJwdmMyrEKXkazZxyUdkYIH/hYBBhmKNmiuGPNw9z3I3f6V8ht8OPbB mz1HgbqxATZf4ZzWDQwVzfsHTh+FGwKl+h5dhh6iJHYS35oh7jJeHJZtC+mSOgMwUTrQ sk2Y887ElpTOnLVgbndOwr9BDF3EKC4/mvdn8JgXAa4zJZLLl9g8f6hvEz1QAgF66iH6 SbVQmY1XlguqJ9NxCIi7j+5ky1pGlEAl3I8xKnykOwIgNd8xMROcrHkpy2CsnO3lBYMq jecg== X-Forwarded-Encrypted: i=1; AJvYcCVEjXp2MxW1aYbheo0zhOZLFRmaDCWP7Y2naGtgLPQgcE1ASCILMCwL0++tZP/qE3ckzWU=@sourceware.org X-Gm-Message-State: AOJu0Ywe2Fp3FYUOyKl6wMasDdx/3xbeUsYuZDafi5qsuTqUZw4jMPAP ip14nezRCUk3F9PcedsBE6elO74iq4jcuWdO2qYmutjbLT9LrjpQz83hhk3CCWJ7X6Y86riktz1 e2+HaMLYroA== X-Gm-Gg: ASbGncv83ZKolzcQvvTMLBe9nUo8i3I5lkwsQbpoDFUieoqo/SREcNYdTl4UmLR+zxE 6Imdjs6mvRcyvSMt6wemCCN34eLbTLVz96vda5yFllkkBeJ3oMb8/eR+PUL7RarNrPWGgoyujlJ OsbGhzXk1A3M3LoePXAcZ/X8e1pHGAYhTXv/1jCLguWLuPS+24S0vLeKpPm/YyYs1crnMkgixDr YEXj3rpcr0qE/rzStXmsVpgSHRZIoEpfMJV8GN05b6y3D8adhETxea7KrjtenuZHykZi+Rvr2lS KYlIyT9xmoTb9zrlonyxAwRS78s6xxGJDihV6uVnmPbER1zU9isQaMVIpJs0Dlw7ap1SXuNmqKF adP0mzLCYvXCXPEYNo3VUtyR1mi9JL0IxX/947DSCOZBesIPAGIr8rW4cvLKrfcdns2BVY7B/vw w0A9TmxIUrfqidvBwnzA4FWxxQ2yZXQg== X-Google-Smtp-Source: AGHT+IG6NZq8Am6QOcTW7WwO030cKBV/Utx9+IAKGbphjWRUU9eF885VwqMDcxlUYtjAf3D4sk6EOQ== X-Received: by 2002:a92:c241:0:b0:427:364b:2201 with SMTP id e9e14a558f8ab-42e7adb359bmr526895ab.30.1759420644126; Thu, 02 Oct 2025 08:57:24 -0700 (PDT) Received: from [192.168.86.35] (syn-174-082-221-071.res.spectrum.com. [174.82.221.71]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-42d8b29512asm10701085ab.37.2025.10.02.08.57.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Oct 2025 08:57:23 -0700 (PDT) Message-ID: Date: Thu, 2 Oct 2025 10:57:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [EXT] Re: gdb does not stop at printf for ppc To: Adhemerval Zanella Netto , Sachin Monga , libc-help@sourceware.org, "libc-alpha@sourceware.org" , gdb@sourceware.org Cc: Segher Boessenkool , Michael Meissner , Surya Kumari Jangala , Carl Love References: <0535055f-7a42-4390-b134-34b8e3ee657e@linaro.org> Content-Language: en-US In-Reply-To: <0535055f-7a42-4390-b134-34b8e3ee657e@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Peter Bergner via Gdb Reply-To: Peter Bergner Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Fixing Carl's email. It seems his old address doesn't work anymore. >> On 9/25/25 2:47 AM, Sachin Monga wrote: >>> >>> There is a test case in GDB where printf is getting converted into >>> __printfieee128 when program is compiled with "--no-builtin" flag. >>> The program is working fine on a machine with glibc 2.34, but not on >>> another machine where glibc 2.40 is installed. > On 01/10/25 01:03, Peter Bergner via Libc-help wrote: >> >> There is actually a GLIBC bugzilla about this and it's not just printf, >> but all IEEE 128-bit floating point functions. I've assigned it to you now! :-) >> I don't remember if the solution in Carl's last comment was actually decided >> to be the correct way to "fix" this though: >> >> https://sourceware.org/bugzilla/show_bug.cgi?id=29989 On 10/1/25 12:20 PM, Adhemerval Zanella Netto wrote: > This is not only an issue for IBM float128 support, but rather for other places > that we use asm alias (for instance 64 bit time support on some 32 bits abis, > fortify support for some symbols that route to _chk variants, etc.). Ok, it's an even bigger problem than we thought. I'm surprised no one else has hit this before us. > And I think Carl's suggestion might work [1], with the following: > > --- > diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c > index 7b1640ceac..d567d98c68 100644 > --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c > +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c > @@ -33,3 +33,6 @@ ___ieee128_printf (const char *format, ...) > return done; > } > strong_alias (___ieee128_printf, __printfieee128) > + > +asm (".local printf\n" > + ".set printf, __printfieee128"); > --- > > Breaking point at printf does work: > > --- > $ cat printf.c > #include > > int main (int argc, char *argv[]) > { > printf ("%La\n", 1.2345L); > } > $ powerpc64le-glibc-linux-gnu-gcc -mabi=ieeelongdouble printf.c -o printf > $ gdb -ex 'set breakpoint pending on' -ex 'b printf' -ex 'r' ./tst-printf-ieeelongdouble > [...] > Breakpoint 1.2, 0x00007ffff7c92528 in ___ieee128_printf (format=format@entry=0x100000d88 "%La\n") at ../sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c:24 > 24 { > --- > > I don't think we have a better solution, attribute (alias) requires the > target symbol to be pre-defined (which would require to reestructure how > the long double alias as done); nor I think the compiler will be able to > easy synthesize it because afaiu this need to done at the TU of the > alternative implementation. Ok, this is promising and yeah, is what Carl and Uli suggested. That said, their comment from the bugzilla: The new redirected symbols need to be dynamic symbols in case only the stripped binary is available. Does your solution work if you strip your test case? Peter