From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 1EA153858402 for ; Fri, 26 Apr 2024 03:00:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1EA153858402 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 1EA153858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714100439; cv=none; b=jF9JjhDwrUYEHTKm2vTslmbpOsscLn3/PkLWGF/5kALlEuHrSzZsUuFMb7fLbeDfhcyqi/fW4qKQE8ySd5Y08KTb1mI8BGOVvxJy6KebI7ROiyy8UoT8OLO3opsGO5ny2UBTQfIpqE5g6GfDTZgdzGq7WAj2Uv9AWHPamK6/99I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714100439; c=relaxed/simple; bh=OIMNR12GwDobBPTHHOdXDMRSmNMBrRmYzN+TABFgyKA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eg3rE5sJmNhEVPBizAECEY9WLHywcQJ1jBkAxj1IGrOg2g6TKMCLJj9HF5YGkMMu4NAP+JiYLXQbxb6/npHoUvKFu2egpYyczmBZ+rx0TtwXoxlzg2f0neuSCu3dcyHpYT2W8+rC4ut8MtHJW9ljVUq7imZiP/49fODKWxI7f7w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c70999ff96so1146886b6e.2 for ; Thu, 25 Apr 2024 20:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714100436; x=1714705236; 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=YKsnEo84Yyou9d3F9crGaw4R2c6lTuXd0A9izt8V4Q4=; b=Y+JLEgtw1THy1kMr83bsPx6BDtH5YLLwILBCeoHZr3m0mA1kRtYNZwi4s9g3JnYqaK rseSYg95d0tNq9j2lfpRqxZeyfCgMFMRG/gxVo8t3aAcgbRWu1NOvt5ioR18STVKcNQJ j5kAqWXgaGnLMXbZ+f3iVmXulsi+4/82xBNmjRR0/sVcPvwXYJLoTYkLJvxjSSbuEYbg 71eoI24PrcrtX8lNCE6j7dI8EZBgfUhK6mRu3XUh9lQNjNPI5BvcABNw7O07gN1ZqVGB +16NAPrr+BVgzsGn6E/eLpFszSLFZb3Br/kM+qA0yG39lDIJXbx+zGkSNXUJhV5l9iTm Dftg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714100436; x=1714705236; 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=YKsnEo84Yyou9d3F9crGaw4R2c6lTuXd0A9izt8V4Q4=; b=AUvtUyANl5T+u43TqOD/sm2wR8yQkxwQJe44eQc8+3WEKW+Y6du/kEfF4u/3+0CO4J iDsgWaxuvEX6NV73QXnqa8eZ67e92da0OrV9wqRFceD8gpVUlQlKP3SNFTu1ZTFfiywR sGR1AZACzGPXJZAIR0zYcBaiBvMjKvbdDznYZc6OdCVZzg6ST01nDigQN+hVTB1wpU1Q DrExQVbHZ1AZyyRNDyf9JQcMN7FEVqUNRS57+pVJebbJ9oSQ3Tj2V7DgHXMw7b41Nl18 vGTUeRnNjuPU8sNFDo5XZpZFmxxfAbOx0pdfxGOoeBtsD7YiKmYoQKkf9ntHwFfRXSXO K0BA== X-Gm-Message-State: AOJu0YwsnzWT1cYPBOvoSSq37ylbP8uOdhjYeTBlU63Y5QYvNGdMEGKT rGNowEeNVw3e04LRXzgFxMHtYNYDdCwb9iDLkMxVdENAg2jbyoJlVbRCu9CmFy3QOlcDEjO+uq8 n X-Google-Smtp-Source: AGHT+IHE0Q44JBRfBNqPBil3w3tKwtA/jdglR+kt9/4AL3Pjb2qvMziYD+/83d3+Yn+plQkB2RGzJw== X-Received: by 2002:a54:4190:0:b0:3c6:100a:86b2 with SMTP id 16-20020a544190000000b003c6100a86b2mr1579382oiy.50.1714100436306; Thu, 25 Apr 2024 20:00:36 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:8e77:627f:e823:2d9f]) by smtp.gmail.com with ESMTPSA id h3-20020a056a00230300b006e6be006637sm13891705pfh.135.2024.04.25.20.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 20:00:35 -0700 (PDT) From: Thiago Jung Bauermann To: Bernd Edlinger Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH v3 1/2] gdb/testsuite: Add libc_has_debug_info require helper In-Reply-To: (Bernd Edlinger's message of "Thu, 25 Apr 2024 21:39:14 +0200") References: <20240422230700.1173173-1-thiago.bauermann@linaro.org> <20240422230700.1173173-2-thiago.bauermann@linaro.org> <20240423100947.3d5692be@f39-zbm-amd> <87h6fq3ezg.fsf@linaro.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Fri, 26 Apr 2024 00:00:33 -0300 Message-ID: <87il0425gu.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 Bernd, Bernd Edlinger writes: > Hi Thiago, > > On 4/24/24 18:25, Thiago Jung Bauermann wrote: >>> >> Thank you! Pushed as commit f5ef12c3f1af. > > I think I have an issue with this commmit. > I use a self-built riscv-unknown-elf toolchain with newlib, > so there is no libc at all, regardless of debug info. > since today, I see messages like: > Running /home/ed/gnu/binutils-build-riscv64/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/relativedebug.exp ... > FAIL: gdb.base/relativedebug.exp: info sharedlibrary libc.so > ERROR: tcl error sourcing /home/ed/gnu/binutils-build-riscv64/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/relativedebug.exp. > ERROR: tcl error code TCL READ VARNAME > ERROR: can't read "libc_has_debug_info": no such variable > while executing > "verbose "$me: returning $libc_has_debug_info" 2" > (procedure "gdb_real__libc_has_debug_info" line 47) > invoked from within > "gdb_real__libc_has_debug_info" Sorry for the trouble. I should have simulated a situation where GDB can't find libc.so in the inferior. I was able to reproduce the error above when I did. Could you please test the patch that I just sent? > 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. :-) -- Thiago