RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2213228 - Don't hardcode gdb.minimal use in gdb-add-index
Summary: Don't hardcode gdb.minimal use in gdb-add-index
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: gcc-toolset-13-gdb
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Keith Seitz
QA Contact: Michal Kolar
URL:
Whiteboard:
Depends On:
Blocks: 2188418 2214593
TreeView+ depends on / blocked
 
Reported: 2023-06-07 14:49 UTC by Nikita Popov
Modified: 2023-11-07 09:45 UTC (History)
1 user (show)

Fixed In Version: gcc-toolset-13-gdb-12.1-3.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2214593 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:32:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-159192 0 None None None 2023-06-07 14:54:13 UTC
Red Hat Product Errata RHBA-2023:6419 0 None None None 2023-11-07 08:32:28 UTC

Description Nikita Popov 2023-06-07 14:49:29 UTC
gdb carries a patch (in both fedora and rhel) which makes gdb-add-index use gdb.minimal: https://gitlab.com/redhat/centos-stream/rpms/gcc-toolset-13-gdb/-/blob/c9s/gdb-libexec-add-index.patch

Contrary to the comment in the patch, this does not just default to gdb.minimal, but will always use it if present, even if a different gdb has been explicitly specified via $PATH or $GDB.

gdb-add-index on LTO builds produced by Clang sometimes requires a newer gdb than the system version. We would like to make use of the gdb provided by gcc-toolset. However, this patch prevents us from specifying the newer gdb.

It should be possible to fix this issue by adding the same " && ! which $GDB &>/dev/null" check as is present in the first part of the patch.

Comment 1 Keith Seitz 2023-06-09 16:03:35 UTC
This patch has recently been rewritten, and is available
in rawhide:

https://src.fedoraproject.org/rpms/gdb/blob/rawhide/f/gdb-add-index.patch

The most obvious change here is that the environment variable "GDB" is
no longer ignored, and is used if set/valid.

Would that suffice?

I can mock up a test build for you, if you'd like to verify. Just let
me know.

Would we need this for RHEL8, too?

Comment 2 Nikita Popov 2023-06-12 09:28:42 UTC
Thanks! This patch should work for us. I did the following in a mock environment:

> source scl_source enable gcc-toolset-13
> vim /opt/rh/gcc-toolset-13/root/bin/gdb-add-index (and replace with the new script)
> export GDB=/opt/rh/gcc-toolset-13/root/usr/bin/gdb
> gdb-add-index build/BUILD/lldb-16.0.1.src/redhat-linux-build/bin/lldb-server

And this worked without error.

> Would we need this for RHEL8, too?

Just RHEL 9 is enough for our purposes.

Comment 3 Michal Kolar 2023-06-28 11:02:57 UTC
Verified with gcc-toolset-13-gdb-12.1-3.el9.

Comment 8 errata-xmlrpc 2023-11-07 08:32:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gcc-toolset-13-gdb bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6419


Note You need to log in before you can comment on or make changes to this bug.