From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id M136KfnhK2ZIAD0AWB0awg (envelope-from ) for ; Fri, 26 Apr 2024 13:18:49 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=jHheXhak; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 989741E0C1; Fri, 26 Apr 2024 13:18:49 -0400 (EDT) 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 76E941E092 for ; Fri, 26 Apr 2024 13:18:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD2DF3858402 for ; Fri, 26 Apr 2024 17:18:46 +0000 (GMT) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id E1B2F3858CD1 for ; Fri, 26 Apr 2024 17:18:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E1B2F3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E1B2F3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714151910; cv=none; b=bHws2Vw/yyDnieZUvaFHD/+oWDc+GLfu1qi5+XxeVi8LwX4+5KMMOWSoe2FdRn0pdh7kRukd0Ysy2FQbhSCKD5Wzkx9zlbUIQyy+4QHOi/IxnEeX+w9oimRW3ICU99853sj0E54685xsctM0yWj63KbPgiw+j0AmLCWnt2WRDP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714151910; c=relaxed/simple; bh=alavJgDvAZDcSwCnTuajt6CfM/gUGsk9HxahMSv2Rt8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OuoOfE9Y8jWwZW4QZQButKqS1OK3wQU0RtVDuHTg+Vn4iq5cN2rGNCnZhrOzK+zrrbOPkGeNcMdmZKYQER39dqK7Ams9oq5RQP++nv4q0WENkovflECQTX+kLYBujN96XD9NKb8eaK0b0DCwSPaII76KQ7+Tva9GDw/zb7k037I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e51398cc4eso22176505ad.2 for ; Fri, 26 Apr 2024 10:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714151907; x=1714756707; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zY8NQDe90LT4JuyOvMYoZcD8H0knKi4pHyFuXZsGsYw=; b=jHheXhaktxV9zlux+6oFMMZUghXs2LgMBckqhLz8qMS+zKRIqF+tywh908pGm0/wrY DiswFqFwVgvsX99G8L07b6nWhjg43nmAe2dJ++185maeP3vIBPMm47S0aJnStv47Ctli xfvlMVi6r8Uzybm8p/o/uuW5BfjVT/+iXAlm76fDS7pQ/Mmj8Gbbcr+P/8Jv7U3rioXV aX02nolUsRIqYlbLdXNUdTFxUh9ctknksiyWF7pDFjbFuweqYbau6POFnVR+0xSNJbQ5 86eyzJY4kAxZ+blivjYhIRZaJt4jQ2OsuN/qOxXHVbC85J/EP0KGDHjvieJjT8Pjb7k1 SOgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714151907; x=1714756707; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zY8NQDe90LT4JuyOvMYoZcD8H0knKi4pHyFuXZsGsYw=; b=ZQbYBjBVIywEtUDIqKoCr7F+VGLujFi/jMe06DSyPCo/Tqjk6ZwrX1WErN8Ct9MQi0 TpH17wkeWNi0ZDhUfdam10nWNsaWhzh2RPvgGhVZ6wFwlMC/1RzYeYWKY1ODKnTaE2B/ PVzJoYdziB41rTdCSYKuCEYuAfT95x3K3zA8/5ubnh7HiYqAzxffcdLEGxO4HjDxGZDn odt3mSGIKyYgFRsVw6yZvg9Khfsy4a/gCzkeV7dYaG8QrTIz+MVn8Z0r1WjfcSIL/55p wbJVFfoKvZ1su/EdgsjMx7jzUZfDjf7IOXnZlPPMc73q382iDN7ISy6F3+tfGOqzNYWL WUGQ== X-Forwarded-Encrypted: i=1; AJvYcCVPRUNlD/XFWhINbJf4F09HJinVjJG+at93gsRvV8lhvj9rBjlBgK0P6hxcM9uTIw/L+vjczroZuEHEQXCHAKk3nss43dYktvGuaw== X-Gm-Message-State: AOJu0Yxs3+3dB4T/Njy3zdrt6/98MkRTLoJOFCzqN1rkYlgw+NBTUM3U EXbGZ2+2G/ouQOgMoMGwUuj96FHgzM/WTX2ckfMZRorQjxNCxQCUt3VR7w8pr4TsGCmoR6fjbvs 6 X-Google-Smtp-Source: AGHT+IEpKjHu2VHNBLap3dZh6iJYGfgkmL7uEL1yEuYpWP2OYzri2w2ApOq5FC5pWy/ZQa46ECsCKg== X-Received: by 2002:a17:902:ea11:b0:1eb:dae:bdab with SMTP id s17-20020a170902ea1100b001eb0daebdabmr3132734plg.46.1714151907585; Fri, 26 Apr 2024 10:18:27 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:a09d:f160:1ed8:4a02]) by smtp.gmail.com with ESMTPSA id p13-20020a635b0d000000b005dc98d9114bsm14878603pgb.43.2024.04.26.10.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 10:18:26 -0700 (PDT) From: Thiago Jung Bauermann To: Pedro Alves Cc: Bernd Edlinger , "gdb-patches@sourceware.org" Subject: Re: [PATCH v3 1/2] gdb/testsuite: Add libc_has_debug_info require helper In-Reply-To: (Pedro Alves's message of "Fri, 26 Apr 2024 17:35:43 +0100") References: <20240422230700.1173173-1-thiago.bauermann@linaro.org> <20240422230700.1173173-2-thiago.bauermann@linaro.org> <20240423100947.3d5692be@f39-zbm-amd> <87h6fq3ezg.fsf@linaro.org> <87il0425gu.fsf@linaro.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Fri, 26 Apr 2024 14:18:24 -0300 Message-ID: <87edas11r3.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Hello Pedro, Pedro Alves writes: > On 2024-04-26 04:00, Thiago Jung Bauermann wrote: >> >> Bernd Edlinger writes: >> >>> while previously that looked like: >>> >>> gdb compile failed, >>> /home/ed/gnu/riscv64-unknown-elf/lib/gcc/riscv64-unknown-elf/14.0.1/../../../../riscv64-unknown-elf/bin/ld: >>> /tmp/ccjr19GC.o: in function `main': >>> /home/ed/gnu/binutils-build-riscv64/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/relativedebug.c:30:(.text+0x28): >>> undefined reference to `alarm' >>> /home/ed/gnu/riscv64-unknown-elf/lib/gcc/riscv64-unknown-elf/14.0.1/../../../../riscv64-unknown-elf/bin/ld: >>> /home/ed/gnu/binutils-build-riscv64/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/relativedebug.c:31:(.text+0x30): >>> undefined reference to `pause' >>> /home/ed/gnu/riscv64-unknown-elf/lib/gcc/riscv64-unknown-elf/14.0.1/../../../../riscv64-unknown-elf/bin/ld: >>> /home/ed/gnu/binutils-build-riscv64/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/relativedebug.c:31:(.text+0x38): >>> undefined reference to `pause' >>> collect2: error: ld returned 1 exit status >>> UNTESTED: gdb.base/relativedebug.exp: failed to compile >>> >>> so not very noisy, newlib does apparently not have alarm, pause, sleep, and similar, >>> but much easier to understand the output... >> >> On the plus side, with this problem fixed gdb.base/relativedebug.exp >> should exit early with: >> >> (gdb) info sharedlibrary libc.so >> No shared libraries matched. >> (gdb) UNSUPPORTED: gdb.base/relativedebug.exp: require failed: libc_has_debug_info (libc >> not found in the inferior) >> >> Which will be even easier to understand the output. :-) >> > > I don't think that's a good outcome, actually. It'll disable the testcase on systems that > link > with their libc statically (even if has debug info), or systems that name their libc > something else. > And I worry that the require predicate will start being used more with that particularity. > > The original check only returned early if a library called "*libc*" was found, and, it > didn't > have debug info. If those conditions didn't match, the testcase proceeded. That seems a > lot safer. As in, only if we know for sure we have a libc without debug info, do we > return early. Ok, makes sense. I'll submit a patch for the libc_has_debug_info that makes it behave like the original check in gdb.base/relativedebug.exp did. -- Thiago