Merge ~liushuyu-011/ubuntu/+source/gdb:ubuntu/jammy-proposed into ubuntu/+source/gdb:ubuntu/jammy-devel

Proposed by Zixing Liu
Status: Needs review
Proposed branch: ~liushuyu-011/ubuntu/+source/gdb:ubuntu/jammy-proposed
Merge into: ubuntu/+source/gdb:ubuntu/jammy-devel
Diff against target: 67 lines (+45/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/libiberty-auto-invoke-d-demangler.patch (+35/-0)
debian/patches/series (+3/-0)
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+463546@code.launchpad.net

This proposal supersedes a proposal from 2024-04-03.

Description of the change

This merge proposal backports one patch from GDB 15 to fix an issue where GDB becomes unusable if the debugged program was compiled using GDC (GCC for D) or LDC2 (LLVM D Compiler).

You can find the full details on this issue here: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2059856.

To post a comment you must log in.
Revision history for this message
Dan Bungert (dbungert) wrote :

Hi Zixing,

One minor note - your description lists GDB 15.1, the current version is GDB 15.0.50.20240403-0ubuntu1. I mention this to clarify that the SRU requirement of "Development Release Fixed First" is in fact satisfied - a simple look at the version number suggests otherwise. I suggest tweaking the description to clarify that it's actually from 15.0.x.

dep3 headers would also be nice.

I also observe that building this (or the current jammy version) has a stuck 100% gdbserver process (!) but that doesn't appear related to this change. A PPA build would be good though.

Revision history for this message
Zixing Liu (liushuyu-011) wrote :

PPA build: https://launchpad.net/~liushuyu-011/+archive/ubuntu/gdb-testing/+sourcepub/15902832/+listing-archive-extra

I will make the changes to state that GDB 15.1 is the upstream version to be released that contains the fix (while 15.0.50.20240403-0ubuntu1 is an Ubuntu version that contains the fix)

I will change the patch to use DEP-3 header

Unmerged commits

0cc4967... by Zixing Liu

Backport GDB PR d/31580 and d/30276 fix to Jammy ...

... this fixes the issue where GDB is unable to inspect any D variables

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ce4d5a2..1f4ddb8 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+gdb (12.1-0ubuntu1~22.04.2) jammy; urgency=medium
7+
8+ * SRU: LP: #2059856: Fix D demangling issue by backporting
9+ the fix from GDB 15 to 22.04 LTS.
10+
11+ -- Zixing Liu <zixing.liu@canonical.com> Sun, 31 Mar 2024 02:43:25 -0600
12+
13 gdb (12.1-0ubuntu1~22.04.1) jammy; urgency=medium
14
15 * SRU: LP: #2041396: Fix SIGILL generated by GDB 12.1 on armhf by
16diff --git a/debian/patches/libiberty-auto-invoke-d-demangler.patch b/debian/patches/libiberty-auto-invoke-d-demangler.patch
17new file mode 100644
18index 0000000..8be136c
19--- /dev/null
20+++ b/debian/patches/libiberty-auto-invoke-d-demangler.patch
21@@ -0,0 +1,35 @@
22+Description: libiberty: Invoke D demangler when --format=auto
23+ This is an upstream patch cherry-picked from GDB 15
24+Author: Tom Tromey <tom@tromey.com>
25+Origin: upstream, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1741ab0dafd899889faab6e862094a325a6b83c
26+Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31580
27+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2059856
28+Applied-Upstream: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1741ab0dafd899889faab6e862094a325a6b83c
29+Last-Update: 2024-04-30
30+---
31+Index: gdb/libiberty/cplus-dem.c
32+===================================================================
33+--- gdb.orig/libiberty/cplus-dem.c
34++++ gdb/libiberty/cplus-dem.c
35+@@ -186,7 +186,7 @@ cplus_demangle (const char *mangled, int
36+ if (GNAT_DEMANGLING)
37+ return ada_demangle (mangled, options);
38+
39+- if (DLANG_DEMANGLING)
40++ if (DLANG_DEMANGLING || AUTO_DEMANGLING)
41+ {
42+ ret = dlang_demangle (mangled, options);
43+ if (ret)
44+Index: gdb/libiberty/testsuite/d-demangle-expected
45+===================================================================
46+--- gdb.orig/libiberty/testsuite/d-demangle-expected
47++++ gdb/libiberty/testsuite/d-demangle-expected
48+@@ -1470,3 +1470,8 @@ demangle.anonymous
49+ --format=dlang
50+ _D8demangle9anonymous03fooZ
51+ demangle.anonymous.foo
52++#
53++# Test that 'auto' works.
54++--format=auto
55++_D8demangle9anonymous03fooZ
56++demangle.anonymous.foo
57diff --git a/debian/patches/series b/debian/patches/series
58index 8ef04e2..45f24e2 100644
59--- a/debian/patches/series
60+++ b/debian/patches/series
61@@ -18,3 +18,6 @@ ptrace-error-verbosity.patch
62 # Backported from GDB 13.1
63 Make-sure-a-copy_insn_closure-is-available-when-we-h.patch
64 Only-allow-closure-lookup-by-address-if-there-are-th.patch
65+
66+# Backported from GDB 15
67+libiberty-auto-invoke-d-demangler.patch

Subscribers

People subscribed via source and target branches