From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by sourceware.org (Postfix) with ESMTPS id BE70B3858D37 for ; Tue, 30 Apr 2024 01:57:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE70B3858D37 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 BE70B3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714442262; cv=none; b=V2/etKSVBrMbaQgeJGSxZVRjfDnBcpICR/exH+eK+RB3N6UTgUScO1rmtKLl/JGmP7Ya5KE6D9bsGJXkFIulYEeQRhm764bprxFkFPR3VJEf3QX1PeLtiMmQ+3DTWymisoo6VsQ7AjgdgyZOFTwMK2qw8cj0IOwP4g85wPnt480= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714442262; c=relaxed/simple; bh=50RGI0Wu9dhrLbxQpg4Cv4ru4wYx7SAROpiSBBrxt1U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BhxJI86u3AURETtFjR9qrGP8Q7kQi2ZgiOqnz0jEQZT3fYdrJGK40hrH9LqIKhj1+MLTI7tH3IZM7FdQ1J1HhMIlMa9L/41k6hZCo8JkXoed/6yfUjIo+2DLxQbj5LdHBg8dZY9mFLmsxaQxpzqkSjh6eamDN+R9MdcGHxcN7PU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-de6074a464aso954655276.0 for ; Mon, 29 Apr 2024 18:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714442260; x=1715047060; 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=mNnQ6WNpIyzhBcplX/uui/XJaqC0b4cLYTXjNPCDm2Q=; b=w8Q7eMGwwCb6BZZuf/W8DxMH5BCLmlajbFfPJZO0sG5acnhMDd3CytrWLGpHwuLIfn oJ2Np4z5DccBS0SvbD/tg0OyVK3K0X4lUoCJHZ6FdayW/R9agzFfsN6FMjiCyYAS0CT4 I669dTlxtq3R7GgaA/JV//Fcdch9aHfXTshn8nLD5mD4nG/jMRflPEEPnkd7wPoxIMBz +g4Hc3QCnRLoLMPv215JXa16aPlgPs8BeIXsUeqlWGCkccDdyehIi1zRHqWwnImUcd8p Oxy3Y4GUUM76MrUHIsYPHaDS4GhGTSekDckpssQF7azqK4x5SS/XsEjOjKP6QeGZvHtb ZYUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714442260; x=1715047060; 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=mNnQ6WNpIyzhBcplX/uui/XJaqC0b4cLYTXjNPCDm2Q=; b=ZFN713BLfnvBHOUxRD7aJ1ke+ymKZH+BSZInmDXAXQrvrWp+4iPW79AnYfigcLrNRS OWmg7PMsOMARUfxDRF1eB2eTH0IsWFIq0F/dw/oUCUUS+wenzb/QZwEWL+cAkbSFR68h R9dM+F5J0uRXg9y+MeA4/5KXnZzv4wp8kWStPHih8Qq2WXRF7ZTbw6mcY1f7QdltTWzc 50yk6dI5UJIl7AYve7HkasVMVYmAFhJePmxwjmdzW11iBQVgNDRYf+xwgFA/wqSPUA7+ Q17bJvY3b0qAbaSdWtAic6ZbNH0gpu3n+CLMox7ToFXKkPgM0vx+9VTNOZJ0LMQKhkz3 AqGg== X-Forwarded-Encrypted: i=1; AJvYcCUrPQQILO/CAMDqKePoe6EqAGaQz/lhtRRQBR+X5QIwX3aJUSescuTy4uUA49S/dkZMYWcZDQ02wv2EkivQwEiF4XpH0SNvEbnhUA== X-Gm-Message-State: AOJu0YxIXUjX+EEbJYgAdSA+IY42OmD9pLoZ5jxnYyRpEIVUWFBU+foO mnq7MBIdBxHVwVzu3XGcHhYY5ugznNA80C7TBX3dBZYztwQGfNtYvFLgRgB5hcJo4j0S1XEy+c4 2 X-Google-Smtp-Source: AGHT+IFsWW82U37J2vFweh51b8SAzDHyc2jg8sEHz8En6edm3R8hcFzbOCOovn6bg74YhFfQAGfPFw== X-Received: by 2002:a05:690c:6184:b0:61b:12:a587 with SMTP id hj4-20020a05690c618400b0061b0012a587mr14509444ywb.3.1714442259909; Mon, 29 Apr 2024 18:57:39 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:3d56:74b5:22f4:1590]) by smtp.gmail.com with ESMTPSA id m15-20020a656a0f000000b005dc4806ad7dsm17435216pgu.40.2024.04.29.18.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 18:57:39 -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: <87edas11r3.fsf@linaro.org> (Thiago Jung Bauermann's message of "Fri, 26 Apr 2024 14:18:24 -0300") 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> <87edas11r3.fsf@linaro.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Mon, 29 Apr 2024 22:57:36 -0300 Message-ID: <87ikzzzk6n.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.9 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 List-Id: Hello Pedro, Thiago Jung Bauermann writes: > 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. Here it is: https://inbox.sourceware.org/gdb-patches/20240430015325.89780-1-thiago.bauermann@linaro.org/ -- Thiago