From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 198A93858D28 for ; Mon, 22 Apr 2024 00:05:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 198A93858D28 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 198A93858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713744328; cv=none; b=jHSmsmiDggX1BQdu3iJEVPGXuOb70WN6qsyDy55YTL0Pfs3j/0VOxKWo2pkzONngGPE8RpAbyY0OCo/P+aAwAs8c9j+nTeGfsvKuAVjNKdJdrAx+ZNHgApS7yhqIC6HN6HHUDSilKxrVbEj07rcfaQyqRcYRWtw982r3/AzUbrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713744328; c=relaxed/simple; bh=N7IrkzWKjIINAOWrO/OejrhdBs/dGR/pNHpOmNhQZjc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QcFQIPuGN+3dlaaj/H3V9ToQeXkic1mxb529v7wiY2prqHN/2V5F9OimwQ6MjMPuZzh9FI6FvaRe2zYZ7nMPkZP0PSrPIoO/Uv/KcOTMzIWEh5ZqsdcHhx6vYQPGVefwythNNxd0xe5SQvX9HeF5ZUiWvlECn5wZ5/3VdTy0nPU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3c70ef25e19so1933464b6e.3 for ; Sun, 21 Apr 2024 17:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713744324; x=1714349124; 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=inpxXr3zEIgv+4BkFHY5fYXykIwgVgQdarD6lOGHxDg=; b=rozlE74W5QN/NMjjGRuvJ4kFeteJ6YJGkKSn8Ci592L9Nkz+k3tyl+K7Ds6gD2KnJn hcYKW+CphP95NKCcueT3HmZLCtUY06Pzt8rdymM1xgIyb0vacDwLJtgZMVS8E0DJA3d9 v58SVBoZ0aQthi0UVQ+Cs5iXGzdhQC2xwo5xKhzBCwlMKL4yZRkF+iEasfkDO7hTGTPi OGKQUp43NWL16qDoo8cVxO69GZyqKXIVoz39KuBhv7Jgt3ZZ6Ee5Ar46n6Oa3C6xPGtr BFQT+DzCuHUJnC2QLlbRdFoXEIQYMLvpVaFFjUgNq/VG+F+M7uewN/dpx7rLacqZx55l 72Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713744324; x=1714349124; 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=inpxXr3zEIgv+4BkFHY5fYXykIwgVgQdarD6lOGHxDg=; b=ni7Z75qyHz/gMtEcn+xRqjubycK6vBE6ZLuavlCaeoGShXP7P27fqTuaDpXqt89iwt 7m0soPOYCe63cNrkX3XujDXtUKxCd2pEI9zX8ZAjcq+bw36xjl3ElfMkaylEbwgezc63 h9yNp5YDq0jNCUqhxn7VoCb5pxh6ZWIOlpkTwHKpjV9oA886/2z1rkwx1JgVH+vA2lRq AK7LNE6U5NjM2jrwdV6ZPMLVmfNLMJ+DewNBu3rBbnpVxuGLeEFw2j16go1Z7LDSdXZK XRWVFyGK1QBrZh64d4puloYPnex3LBP/WhCjWMvXdERDyvgP4/tjRVpl99PsvMaHaLvI yTEg== X-Gm-Message-State: AOJu0Yx4kNZY1+7LfikiX6DJcUykcGx8I0oqVr+OLnN+2mr8aBFn7inv fVb8pzhiE2vKKx1851TTg+cLwvjvtZKwvrRTv4w6qlak6GLVfXlpQ1eLkalmN+Y= X-Google-Smtp-Source: AGHT+IG4zeZ36CPC8frVzT69Feq/waBlisjTR+2n+T+rqCLA1Ng7DzpkekHdF9aVn6aIC7YUVasa+g== X-Received: by 2002:a54:4401:0:b0:3c7:3140:256e with SMTP id k1-20020a544401000000b003c73140256emr9497753oiw.14.1713744324303; Sun, 21 Apr 2024 17:05:24 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:3224:7231:e42f:1da5]) by smtp.gmail.com with ESMTPSA id y5-20020a63fa05000000b005cf450e91d2sm6458517pgh.52.2024.04.21.17.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 17:05:23 -0700 (PDT) From: Thiago Jung Bauermann To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb/testsuite: Add libc_has_debug_info require helper In-Reply-To: <20240421140225.455d785f@f39-zbm-amd> (Kevin Buettner's message of "Sun, 21 Apr 2024 14:02:25 -0700") References: <20240420213307.976401-1-thiago.bauermann@linaro.org> <20240420213307.976401-2-thiago.bauermann@linaro.org> <20240421134406.2c6ac5af@f39-zbm-amd> <20240421140225.455d785f@f39-zbm-amd> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Sun, 21 Apr 2024 21:05:20 -0300 Message-ID: <875xwa45z3.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 Kevin, Thank you for your review! Sorry for sending v2 without addressing your comments. I only saw your emails after I sent the series. Kevin Buettner writes: > On Sun, 21 Apr 2024 13:44:06 -0700 > Kevin Buettner wrote: > >> On Sat, 20 Apr 2024 18:33:06 -0300 >> Thiago Jung Bauermann wrote: >> >> > Factor the test for libc debug info out of gdb.base/relativedebug.exp to >> > a new procedure. >> > >> > Also, change the "info sharedlibrary" test to explicitly detect when >> > libc has debug info. >> >> LGTM. >> >> Approved-by: Kevin Buettner > > Just found a problem... While attempting to test part 2 using clang: > > make check RUNTESTFLAGS="CC_FOR_TARGET=clang" TESTS="gdb.base/memops-watchpoint.exp" > > Then, in the log file: > > get_compiler_info: clang-17-0-6 > Executing on host: clang /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c -fdiagnostics-color=never -Wno-unknown-warning-option -w -g -g -lm -o /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.x (timeout = 300) > builtin_spawn -ignore SIGHUP clang /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c -fdiagnostics-color=never -Wno-unknown-warning-option -w -g -g -lm -o /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.x > /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c:3:6: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > 3 | printf ("Hello, world!\n"); > | ^ > /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c:3:6: note: include the header or explicitly provide a declaration for 'printf' > 1 error generated. > compiler exited with status 1 > UNSUPPORTED: gdb.base/memops-watchpoint.exp: require failed: libc_has_debug_info (failed to compile test program) > > My testing shows that things will work if you add the suggested #include to > the "set src" text. Ah, of course. GCC doesn't complain about it because of the -w option: -w Inhibit all warning messages. and in GCC this is a warning not an error. I'll fix it in the next version. -- Thiago