Bug 31700 - Recent change in gdb.base/relativedebug.exp disables it in systems with statically linked libc
Summary: Recent change in gdb.base/relativedebug.exp disables it in systems with stati...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 15.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-04 00:34 UTC by Thiago Jung Bauermann
Modified: 2024-05-23 14:06 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Jung Bauermann 2024-05-04 00:34:11 UTC
Pedro pointed out¹ that commit f5ef12c3f1af ("gdb/testsuite: Add libc_has_debug_info require helper") "[will] disable the testcase on systems that link with their libc statically (even if has debug info), or systems that name their libc something else."

¹ https://inbox.sourceware.org/gdb-patches/b0409c48-7f9c-4430-91d9-dc7cfa86a9c7@palves.net/
Comment 1 Thiago Jung Bauermann 2024-05-04 00:35:30 UTC
I posted a patch restoring the original test behaviour here:

https://inbox.sourceware.org/gdb-patches/20240430015325.89780-1-thiago.bauermann@linaro.org/

Another alternative would be to revert commit f5ef12c3f1af. I would be ok with that.
Comment 2 Joel Brobecker 2024-05-04 01:11:34 UTC
I'm setting the 15.1 target milestone, because this one is a regression that seems to be in good tracks to be fixed quickly.
Comment 3 Sourceware Commits 2024-05-23 03:58:39 UTC
The master branch has been updated by Thiago Bauermann <bauermann@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=100318bcfda243f04cda3c29e8873c5710a1688a

commit 100318bcfda243f04cda3c29e8873c5710a1688a
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date:   Mon Apr 29 22:53:25 2024 -0300

    gdb/testsuite: Restore libc_has_debug_info's less strict behaviour
    
    The code that was factored out from gdb.base/relativedebug.exp assumed that
    libc has debug info and only determined that it doesn't if it saw a specific
    message from GDB to that effect.  In the process of factoring it into a
    require predicate, I made it stricter by trying to make a specific
    determination of whether or not debug info is available.
    
    Pedro noticed that "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."  Which is something I hadn't considered.
    
    This patch returns libc_has_debug_info to the original behaviour.
    
    Also, remove a verbose message that is redundant with the $message
    variable.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31700
    Approved-By: Tom Tromey <tom@tromey.com>
Comment 4 Tom Tromey 2024-05-23 14:06:01 UTC
IIUC this is fixed now.