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

Subscribers

People subscribed via source and target branches