public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp
@ 2024-05-21 15:44 Tom de Vries
  2024-05-21 15:44 ` [PATCH 02/11] [gdb/macros] Handle 64-bit dwarf in gdb.base/fission-macro.exp Tom de Vries
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

Starting with gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
macro sections for split DWARF"), available from release gcc 14.1 onwards, gcc
produces a usable dwarf-5 32-bit .debug_macro.dwo section.

Add a test-case excercising this.

Tested on x86_64-linux.

Tested test-case using a current gcc trunk build, and gcc 14.
---
 gdb/testsuite/gdb.base/fission-macro-2.c | 27 +++++++++
 gdb/testsuite/gdb.base/fission-macro.c   | 27 +++++++++
 gdb/testsuite/gdb.base/fission-macro.exp | 75 ++++++++++++++++++++++++
 3 files changed, 129 insertions(+)
 create mode 100644 gdb/testsuite/gdb.base/fission-macro-2.c
 create mode 100644 gdb/testsuite/gdb.base/fission-macro.c
 create mode 100644 gdb/testsuite/gdb.base/fission-macro.exp

diff --git a/gdb/testsuite/gdb.base/fission-macro-2.c b/gdb/testsuite/gdb.base/fission-macro-2.c
new file mode 100644
index 00000000000..fb088c8bfaf
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro-2.c
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2024 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define THIRD 3
+#define FOURTH 4
+
+extern int foo (void);
+
+int
+foo (void)
+{
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.base/fission-macro.c b/gdb/testsuite/gdb.base/fission-macro.c
new file mode 100644
index 00000000000..9c8cbece5c5
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro.c
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2024 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define FIRST 1
+#define SECOND 2
+
+extern int foo (void);
+
+int
+main (void)
+{
+  return foo ();
+}
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
new file mode 100644
index 00000000000..705e3dd0c4b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -0,0 +1,75 @@
+# Copyright 2024 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Gcc 14 is the first release containing the fix for PR debug/111409.
+require {expr [gcc_major_version] >= 14}
+
+standard_testfile .c -2.c
+
+proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
+    set opts {}
+    lappend opts debug
+    lappend opts quiet
+    lappend opts additional_flags=-gsplit-dwarf
+    lappend opts macros
+
+    if { $dwarf_bits == 64 } {
+	lappend opts additional_flags=-gdwarf64
+    }
+
+    if { $strict_dwarf } {
+	lappend opts additional_flags=-gstrict-dwarf
+    }
+
+    lappend opts additional_flags=-gdwarf-$dwarf_version
+
+    set id v$dwarf_version-b$dwarf_bits-s$strict_dwarf
+
+    set srcfiles [list $::srcfile $::srcfile2]
+    if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
+	return -1
+    }
+
+    clean_restart
+
+    gdb_load_no_complaints $::binfile-$id
+
+    if {![runto_main]} {
+	return 0
+    }
+
+    gdb_test "p FIRST" " = 1"
+    gdb_test "p SECOND" " = 2"
+
+    gdb_test "info macro FIRST" "#define FIRST 1"
+    gdb_test "info macro SECOND" "#define SECOND 2"
+
+    gdb_breakpoint foo
+    gdb_continue_to_breakpoint "foo"
+
+    gdb_test "p THIRD" " = 3"
+    gdb_test "p FOURTH" " = 4"
+
+    gdb_test "info macro THIRD" "#define THIRD 3"
+    gdb_test "info macro FOURTH" "#define FOURTH 4"
+}
+
+foreach_with_prefix dwarf_version {5} {
+    foreach_with_prefix dwarf_bits {32} {
+	foreach_with_prefix strict_dwarf {0 1} {
+	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
+	}
+    }
+}

base-commit: 05887e360ad3db3265e3dc2f7a845660d1d3c02f
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 02/11] [gdb/macros] Handle 64-bit dwarf in gdb.base/fission-macro.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp Tom de Vries
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When enabling 64-bit dwarf in the test-case gdb.base/fission-macro.exp, we run
into:
...
(gdb) break -qualified main^M
DW_MACRO_define_strx pointing outside of .debug_str.dwo section \
  [in module fission-macro-5-640.dwo]^M
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=64: \
  gdb_breakpoint: set breakpoint at main
...

A dwarf-5 .debug_str_offsets section starts with a header consisting of:
- an initial length (4 bytes for 32-bit and 12 bytes for 64-bit),
- a 2 byte version string, and
- 2 bytes padding
so in total 8 bytes for 32-bit and 16 bytes for 64-bit.

This offset is calculated here in dwarf_decode_macros:
...
      str_offsets_base = cu->header.addr_size;
...
and in both cases this evaluates to 8.

So in the 64-bit case, we interpret the last 8 bytes of the header as an offset.

Fix this by computing str_offsets_base correctly for dwarf-5, for both the
32-bit and 64-bit case.

Tested on x86_64-linux.

Tested test-case using a current gcc trunk build, and gcc 14.
---
 gdb/dwarf2/read.c                        | 11 ++++++++++-
 gdb/testsuite/gdb.base/fission-macro.exp |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e8416905163..4884553000a 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -21232,7 +21232,16 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
       str_offsets_section = &cu->dwo_unit->dwo_file
 			       ->sections.str_offsets;
       str_section = &cu->dwo_unit->dwo_file->sections.str;
-      str_offsets_base = cu->header.addr_size;
+      if (cu->per_cu->version () <= 4)
+	str_offsets_base = cu->header.addr_size;
+      else
+	{
+	  bfd *abfd = str_offsets_section->get_bfd_owner ();
+	  unsigned int bytes_read = 0;
+	  read_initial_length (abfd, str_offsets_section->buffer, &bytes_read, false);
+	  const bool is_dwarf64 = bytes_read != 4;
+	  str_offsets_base = is_dwarf64 ? 16 : 8;
+	}
     }
   else
     {
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 705e3dd0c4b..4eb9c0efe21 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -67,7 +67,7 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
 }
 
 foreach_with_prefix dwarf_version {5} {
-    foreach_with_prefix dwarf_bits {32} {
+    foreach_with_prefix dwarf_bits {32 64} {
 	foreach_with_prefix strict_dwarf {0 1} {
 	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
 	}
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
  2024-05-21 15:44 ` [PATCH 02/11] [gdb/macros] Handle 64-bit dwarf in gdb.base/fission-macro.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-06-13 16:27   ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 04/11] [gdb/macros] Work around gcc PR debug/99319 Tom de Vries
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

We can exercise test-case gdb.base/fission-macro.exp using gcc release 14.

We cannot use the test-case with a gcc release earlier than gcc 14, because
it's missing gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
macro sections for split DWARF").

A way to work around this is to use a .i file instead of a .c file.  Add a
test-case using this approach.

This allows use to excercise gcc 11-13 in addition.

Tested on x86_64-linux.

Tested test-case using a current gcc trunk build and gcc 11-14.
---
 gdb/testsuite/gdb.base/fission-macro-i-2.i | 27 ++++++++
 gdb/testsuite/gdb.base/fission-macro-i.exp | 77 ++++++++++++++++++++++
 gdb/testsuite/gdb.base/fission-macro-i.i   | 27 ++++++++
 3 files changed, 131 insertions(+)
 create mode 100644 gdb/testsuite/gdb.base/fission-macro-i-2.i
 create mode 100644 gdb/testsuite/gdb.base/fission-macro-i.exp
 create mode 100644 gdb/testsuite/gdb.base/fission-macro-i.i

diff --git a/gdb/testsuite/gdb.base/fission-macro-i-2.i b/gdb/testsuite/gdb.base/fission-macro-i-2.i
new file mode 100644
index 00000000000..fb088c8bfaf
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro-i-2.i
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2024 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define THIRD 3
+#define FOURTH 4
+
+extern int foo (void);
+
+int
+foo (void)
+{
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
new file mode 100644
index 00000000000..bf1ca206a6c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
@@ -0,0 +1,77 @@
+# Copyright 2024 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+# Gcc 11 is the first release containing the fix for PR debug/99319.
+require {expr [gcc_major_version] >= 11}
+
+# Use a .i file instead of a .c file, to make sure that we only generate one
+# .debug_macros section, working around gcc PR debug/111409.
+standard_testfile .i -2.i
+
+proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
+    set opts {}
+    lappend opts debug
+    lappend opts quiet
+    lappend opts additional_flags=-gsplit-dwarf
+    lappend opts macros
+
+    if { $dwarf_bits == 64 } {
+	lappend opts additional_flags=-gdwarf64
+    }
+
+    if { $strict_dwarf } {
+	lappend opts additional_flags=-gstrict-dwarf
+    }
+
+    lappend opts additional_flags=-gdwarf-$dwarf_version
+
+    set id v$dwarf_version-b$dwarf_bits-s$strict_dwarf
+
+    set srcfiles [list $::srcfile $::srcfile2]
+    if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
+	return -1
+    }
+
+    clean_restart
+
+    gdb_load_no_complaints $::binfile-$id
+
+    if {![runto_main]} {
+	return 0
+    }
+
+    gdb_test "p FIRST" " = 1"
+    gdb_test "p SECOND" " = 2"
+
+    gdb_test "info macro FIRST" "#define FIRST 1"
+    gdb_test "info macro SECOND" "#define SECOND 2"
+
+    gdb_breakpoint foo
+    gdb_continue_to_breakpoint "foo"
+
+    gdb_test "p THIRD" " = 3"
+    gdb_test "p FOURTH" " = 4"
+
+    gdb_test "info macro THIRD" "#define THIRD 3"
+    gdb_test "info macro FOURTH" "#define FOURTH 4"
+}
+
+foreach_with_prefix dwarf_version {5} {
+    foreach_with_prefix dwarf_bits {32 64} {
+	foreach_with_prefix strict_dwarf {0 1} {
+	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
+	}
+    }
+}
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.i b/gdb/testsuite/gdb.base/fission-macro-i.i
new file mode 100644
index 00000000000..9c8cbece5c5
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro-i.i
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2024 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define FIRST 1
+#define SECOND 2
+
+extern int foo (void);
+
+int
+main (void)
+{
+  return foo ();
+}
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 04/11] [gdb/macros] Work around gcc PR debug/99319
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
  2024-05-21 15:44 ` [PATCH 02/11] [gdb/macros] Handle 64-bit dwarf in gdb.base/fission-macro.exp Tom de Vries
  2024-05-21 15:44 ` [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 05/11] [gdb/macros] Work around a gcc PR fixed in gcc 9 Tom de Vries
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.base/fission-macro-i.exp using gcc-10 we get:
...
(gdb) break -qualified main^M
DW_FORM_strp pointing outside of .debug_str section [in module fission-macro-i-5-32]^M
(gdb) FAIL: gdb.base/fission-macro-i.exp: dwarf_version=5: dwarf_bits=32: \
  gdb_breakpoint: set breakpoint at main
...

The problem is that gcc emits this in the .debug_macro.dwo section:
...
        .byte   0x5     # Define macro strp
        .uleb128 0x12   # At line number 18
        .uleb128 0      # The macro: "FIRST 1"
        .byte   0x5     # Define macro strp
        .uleb128 0x13   # At line number 19
        .uleb128 0x5    # The macro: "SECOND 2"
...

The second operand of a DW_MACRO_define_strp is supposed be an offset into the
.debug_str section, but it's actually an index into the .debug_str_offsets
section:
...
        .long   0       # indexed string 0x0: FIRST 1
	...
        .long   0xba    # indexed string 0x5: SECOND 2
...

In other words, gcc is actually emitting a DW_MACRO_define_strx while labeling it a
DW_MACRO_define_strp.

Work around this by treating it as a DW_MACRO_define_strx.

Tested on x86_64-linux.

Tested test-case (and gdb.base/fission-macro.exp) using a current gcc trunk
build and gcc 9-14.
---
 gdb/dwarf2/cu.c                            |  1 +
 gdb/dwarf2/cu.h                            |  1 +
 gdb/dwarf2/macro.c                         | 18 ++++++++++++++++++
 gdb/dwarf2/read.c                          | 11 +++++++++++
 gdb/dwarf2/read.h                          |  4 ++++
 gdb/testsuite/gdb.base/fission-macro-i.exp |  3 +--
 6 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
index a64cb1d8380..e51ac900ea3 100644
--- a/gdb/dwarf2/cu.c
+++ b/gdb/dwarf2/cu.c
@@ -34,6 +34,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu,
     checked_producer (false),
     producer_is_gxx_lt_4_6 (false),
     producer_is_gcc_lt_4_3 (false),
+    producer_is_gcc_lt_11 (false),
     producer_is_gcc_11 (false),
     producer_is_icc (false),
     producer_is_icc_lt_14 (false),
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index 58e89960aad..190d395159d 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -256,6 +256,7 @@ struct dwarf2_cu
   bool checked_producer : 1;
   bool producer_is_gxx_lt_4_6 : 1;
   bool producer_is_gcc_lt_4_3 : 1;
+  bool producer_is_gcc_lt_11 : 1;
   bool producer_is_gcc_11 : 1;
   bool producer_is_icc : 1;
   bool producer_is_icc_lt_14 : 1;
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index a511d0a3b44..fd081f3c1f9 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -480,6 +480,15 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
       macinfo_type = (enum dwarf_macro_record_type) read_1_byte (abfd, mac_ptr);
       mac_ptr++;
 
+      if (section_is_gnu && cu->dwo_unit != nullptr
+	  && cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))
+	{
+	  if (macinfo_type == DW_MACRO_define_strp)
+	    macinfo_type = DW_MACRO_define_strx;
+	  else if (macinfo_type == DW_MACRO_undef_strp)
+	    macinfo_type = DW_MACRO_undef_strx;
+	}
+
       /* Note that we rely on the fact that the corresponding GNU and
 	 DWARF constants are the same.  */
       DIAGNOSTIC_PUSH
@@ -850,6 +859,15 @@ dwarf_decode_macros (dwarf2_per_objfile *per_objfile,
       macinfo_type = (enum dwarf_macro_record_type) read_1_byte (abfd, mac_ptr);
       mac_ptr++;
 
+      if (section_is_gnu && cu->dwo_unit != nullptr
+	  && cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))
+	{
+	  if (macinfo_type == DW_MACRO_define_strp)
+	    macinfo_type = DW_MACRO_define_strx;
+	  else if (macinfo_type == DW_MACRO_undef_strp)
+	    macinfo_type = DW_MACRO_undef_strx;
+	}
+
       /* Note that we rely on the fact that the corresponding GNU and
 	 DWARF constants are the same.  */
       DIAGNOSTIC_PUSH
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 4884553000a..3c2698d6832 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7268,6 +7268,16 @@ producer_is_gcc_lt_4_3 (struct dwarf2_cu *cu)
   return cu->producer_is_gcc_lt_4_3;
 }
 
+/* See dwarf2/read.h.  */
+bool
+producer_is_gcc_lt_11 (struct dwarf2_cu *cu)
+{
+  if (!cu->checked_producer)
+    check_producer (cu);
+
+  return cu->producer_is_gcc_lt_11;
+}
+
 /* See dwarf2/read.h.  */
 bool
 producer_is_clang (struct dwarf2_cu *cu)
@@ -11299,6 +11309,7 @@ check_producer (struct dwarf2_cu *cu)
     {
       cu->producer_is_gxx_lt_4_6 = major < 4 || (major == 4 && minor < 6);
       cu->producer_is_gcc_lt_4_3 = major < 4 || (major == 4 && minor < 3);
+      cu->producer_is_gcc_lt_11 = major < 11;
       cu->producer_is_gcc_11 = major == 11;
     }
   else if (producer_is_icc (cu->producer, &major, &minor))
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 7ab61528ab7..7fca859c43d 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -818,6 +818,10 @@ extern void dwarf2_get_section_info (struct objfile *,
 				     asection **, const gdb_byte **,
 				     bfd_size_type *);
 
+/* Return true if the producer of the inferior is gcc, and earlier than
+   gcc 11.  */
+extern bool producer_is_gcc_lt_11 (struct dwarf2_cu *cu);
+
 /* Return true if the producer of the inferior is clang.  */
 extern bool producer_is_clang (struct dwarf2_cu *cu);
 
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
index bf1ca206a6c..3121e1d289b 100644
--- a/gdb/testsuite/gdb.base/fission-macro-i.exp
+++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
@@ -13,8 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-# Gcc 11 is the first release containing the fix for PR debug/99319.
-require {expr [gcc_major_version] >= 11}
+require {expr [gcc_major_version] >= 9}
 
 # Use a .i file instead of a .c file, to make sure that we only generate one
 # .debug_macros section, working around gcc PR debug/111409.
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 05/11] [gdb/macros] Work around a gcc PR fixed in gcc 9
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (2 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 04/11] [gdb/macros] Work around gcc PR debug/99319 Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 06/11] [gdb/macros] Handle v4 dwarf in gdb.base/fission-macro.exp Tom de Vries
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.base/fission-macro-i.exp with gcc 8, we run into:
...
(gdb) set complaints 0^M
Offset from DW_FORM_GNU_str_index or DW_FORM_strx pointing outside of \
  .debug_str.dwo section in CU at offset 0x0 \
  [in module fission-macro-i-v5-b32-s0]^M
(gdb) FAIL: gdb.base/fission-macro-i.exp: dwarf_version=5: dwarf_bits=32: \
  strict_dwarf=0: set complaints 0
...

We're using dwarf5, so the .debug_str_offsets section is supposed to have a
header, but there's none:
...
        .section        .debug_str_offsets.dwo,"e",@progbits
        .long   0       # indexed string 0x0: GNU C17 8.2.1 20180831 ...
        .long   0x87    # indexed string 0x1: FIRST 1
        .long   0x8f    # indexed string 0x2: /home/vries/gdb
        .long   0x9f    # indexed string 0x3: main
        .long   0xa4    # indexed string 0x4: fission-macro-i.i
        .long   0xe1    # indexed string 0x5: SECOND 2
...

In other words, we have a v4-style .debug_str_offsets section.

Workaround this by detecting that it's not a valid v5 header by comparing the
initial length to the the section size, and handling it as a v4 section.

IWBN to enable this workaround only for gcc version < 9, but unfortunately the
workaround is required to correctly read the producer string, so that's not
possible.

Tested on x86_64-linux.

Tested test-case (and gdb.base/fission-macro.exp) using a current gcc trunk
build and gcc 7-14.
---
 gdb/dwarf2/read.c                          | 77 +++++++++++++++-------
 gdb/testsuite/gdb.base/fission-macro-i.exp |  2 -
 2 files changed, 53 insertions(+), 26 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3c2698d6832..abe128f35df 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17514,32 +17514,47 @@ read_dwo_str_index (const struct die_reader_specs *reader, ULONGEST str_index)
       const gdb_byte *p = reader->dwo_file->sections.str_offsets.buffer;
 
       /* Header: Initial length.  */
-      read_initial_length (abfd, p + bytes_read, &bytes_read);
+      LONGEST initial_length
+	= read_initial_length (abfd, p + bytes_read, &bytes_read);
 
-      /* Determine offset_size based on the .debug_str_offsets header.  */
-      const bool dwarf5_is_dwarf64 = bytes_read != 4;
-      offset_size = dwarf5_is_dwarf64 ? 8 : 4;
+      if (initial_length + bytes_read
+	  == reader->dwo_file->sections.str_offsets.size)
+	{
+	  /* Determine offset_size based on the .debug_str_offsets header.  */
+	  const bool dwarf5_is_dwarf64 = bytes_read != 4;
+	  offset_size = dwarf5_is_dwarf64 ? 8 : 4;
 
-      /* Header: Version.  */
-      unsigned version = read_2_bytes (abfd, p + bytes_read);
-      bytes_read += 2;
+	  /* Header: Version.  */
+	  unsigned version = read_2_bytes (abfd, p + bytes_read);
+	  bytes_read += 2;
 
-      if (version <= 4)
-	{
-	  /* We'd like one warning here about ignoring the section, but
-	     because we parse the header more than once (see FIXME above)
-	     we'd have many warnings, so use a complaint instead, which at
-	     least has a limit. */
-	  complaint (_("Section .debug_str_offsets in %s has unsupported"
-		       " version %d, use empty string."),
-		     reader->dwo_file->dwo_name.c_str (), version);
-	  return "";
-	}
+	  if (version <= 4)
+	    {
+	      /* We'd like one warning here about ignoring the section, but
+		 because we parse the header more than once (see FIXME above)
+		 we'd have many warnings, so use a complaint instead, which at
+		 least has a limit. */
+	      complaint (_("Section .debug_str_offsets in %s has unsupported"
+			   " version %d, use empty string."),
+			 reader->dwo_file->dwo_name.c_str (), version);
+	      return "";
+	    }
 
-      /* Header: Padding.  */
-      bytes_read += 2;
+	  /* Header: Padding.  */
+	  bytes_read += 2;
 
-      str_offsets_base = bytes_read;
+	  str_offsets_base = bytes_read;
+	}
+      else
+	{
+	  /* GCC 8 and earlier has a bug that for dwarf5 it produces a
+	     pre-dwarf5 .debug_str_offsets section.  We'd wish we could make
+	     this work-around more precise by checking that producer is gcc and
+	     gcc version <= 8, but that doesn't work if we need this workaround
+	     to read the producer string.  */
+	  offset_size = 4;
+	  str_offsets_base = 0;
+	}
     }
   else
     {
@@ -21249,9 +21264,23 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 	{
 	  bfd *abfd = str_offsets_section->get_bfd_owner ();
 	  unsigned int bytes_read = 0;
-	  read_initial_length (abfd, str_offsets_section->buffer, &bytes_read, false);
-	  const bool is_dwarf64 = bytes_read != 4;
-	  str_offsets_base = is_dwarf64 ? 16 : 8;
+	  LONGEST initial_length
+	    = read_initial_length (abfd, str_offsets_section->buffer,
+				   &bytes_read, false);
+	  if ((bytes_read == 4 || bytes_read == 12)
+	      && initial_length + bytes_read == str_offsets_section->size)
+	    {
+	      const bool is_dwarf64 = bytes_read != 4;
+	      str_offsets_base = is_dwarf64 ? 16 : 8;
+	    }
+	  else
+	    {
+	      /* GCC 8 and earlier has a bug that for dwarf5 it produces a
+		 pre-dwarf5 .debug_str_offsets section.  We use the same test
+		 as in read_dwo_str_index.  */
+	      str_offsets_base = 0;
+	      offset_size = 4;
+	    }
 	}
     }
   else
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
index 3121e1d289b..ae211d0e09b 100644
--- a/gdb/testsuite/gdb.base/fission-macro-i.exp
+++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
@@ -13,8 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-require {expr [gcc_major_version] >= 9}
-
 # Use a .i file instead of a .c file, to make sure that we only generate one
 # .debug_macros section, working around gcc PR debug/111409.
 standard_testfile .i -2.i
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 06/11] [gdb/macros] Handle v4 dwarf in gdb.base/fission-macro.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (3 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 05/11] [gdb/macros] Work around a gcc PR fixed in gcc 9 Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 07/11] [gdb/macros] Workaround gcc PR debug/115066 Tom de Vries
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.base/fission-macro.exp with dwarf v4 enabled and a
gcc trunk build containing the fix for gcc PR debug/115066, we run into:
...
(gdb) info macro FIRST^M
Defined at /data/vries/gdb/src/gdb/testsuite/gdb.base/fission-macro.c:0^M
-DFIRST=1^M
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=4: dwarf_bits=32: \
  strict_dwarf=0: info macro FIRST
...

The problem is in dwarf_decode_macros, where we're setting str_offsets_base
effectively to 8:
...
      if (cu->per_cu->version () <= 4)
	str_offsets_base = cu->header.addr_size;
...

Fix this by setting it to 0.

Tested on x86_64-linux.

Tested test-case (and gdb.base/fission-macro-i.exp) using a current gcc trunk
build and gcc 7-14.
---
 gdb/dwarf2/read.c                          | 2 +-
 gdb/testsuite/gdb.base/fission-macro-i.exp | 6 +++++-
 gdb/testsuite/gdb.base/fission-macro.exp   | 6 +++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index abe128f35df..e5f65ad28f2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -21259,7 +21259,7 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 			       ->sections.str_offsets;
       str_section = &cu->dwo_unit->dwo_file->sections.str;
       if (cu->per_cu->version () <= 4)
-	str_offsets_base = cu->header.addr_size;
+	str_offsets_base = 0;
       else
 	{
 	  bfd *abfd = str_offsets_section->get_bfd_owner ();
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
index ae211d0e09b..62304f9b69e 100644
--- a/gdb/testsuite/gdb.base/fission-macro-i.exp
+++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
@@ -65,7 +65,11 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
     gdb_test "info macro FOURTH" "#define FOURTH 4"
 }
 
-foreach_with_prefix dwarf_version {5} {
+foreach_with_prefix dwarf_version {4 5} {
+    if { $dwarf_version == 4 && [gcc_major_version] < 15 } {
+	# Gcc does not contain fix for PR debug/115066.
+	continue
+    }
     foreach_with_prefix dwarf_bits {32 64} {
 	foreach_with_prefix strict_dwarf {0 1} {
 	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 4eb9c0efe21..9e5d5c0a0d5 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -66,7 +66,11 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
     gdb_test "info macro FOURTH" "#define FOURTH 4"
 }
 
-foreach_with_prefix dwarf_version {5} {
+foreach_with_prefix dwarf_version {4 5} {
+    if { $dwarf_version == 4 && [gcc_major_version] < 15 } {
+	# Gcc does not contain fix for PR debug/115066.
+	continue
+    }
     foreach_with_prefix dwarf_bits {32 64} {
 	foreach_with_prefix strict_dwarf {0 1} {
 	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 07/11] [gdb/macros] Workaround gcc PR debug/115066
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (4 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 06/11] [gdb/macros] Handle v4 dwarf in gdb.base/fission-macro.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 08/11] [gdb/testsuite] Extend gdb.base/fission-macro.exp Tom de Vries
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.base/fission-macro.exp with gcc 14, we run into:
...
(gdb) p FIRST^M
No symbol "FIRST" in current context.^M
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=4: dwarf_bits=32: \
  strict_dwarf=0: p FIRST
...

This is because gcc 14 is missing the fix for gcc PR debug/115066, which is
basically the dwarf-4 variant of dwarf-5 gcc PR debug/99319, for which we
already have a workaround.

Likewise, work around this problem for v4 dwarf.

Tested on x86_64-linux.

Tested test-case (and gdb.base/fission-macro-i.exp) using a current gcc trunk
build and gcc 7-14.
---
 gdb/dwarf2/cu.c                            |  1 +
 gdb/dwarf2/cu.h                            |  1 +
 gdb/dwarf2/macro.c                         |  6 ++++--
 gdb/dwarf2/read.c                          | 11 +++++++++++
 gdb/dwarf2/read.h                          |  4 ++++
 gdb/testsuite/gdb.base/fission-macro-i.exp |  4 ----
 gdb/testsuite/gdb.base/fission-macro.exp   |  4 ----
 7 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
index e51ac900ea3..9a5ee59bbcf 100644
--- a/gdb/dwarf2/cu.c
+++ b/gdb/dwarf2/cu.c
@@ -35,6 +35,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu,
     producer_is_gxx_lt_4_6 (false),
     producer_is_gcc_lt_4_3 (false),
     producer_is_gcc_lt_11 (false),
+    producer_is_gcc_lt_15 (false),
     producer_is_gcc_11 (false),
     producer_is_icc (false),
     producer_is_icc_lt_14 (false),
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index 190d395159d..875b0250e3e 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -257,6 +257,7 @@ struct dwarf2_cu
   bool producer_is_gxx_lt_4_6 : 1;
   bool producer_is_gcc_lt_4_3 : 1;
   bool producer_is_gcc_lt_11 : 1;
+  bool producer_is_gcc_lt_15 : 1;
   bool producer_is_gcc_11 : 1;
   bool producer_is_icc : 1;
   bool producer_is_icc_lt_14 : 1;
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index fd081f3c1f9..10daca2cc54 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -481,7 +481,8 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
       mac_ptr++;
 
       if (section_is_gnu && cu->dwo_unit != nullptr
-	  && cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))
+	  && ((cu->per_cu->version () <= 4 && producer_is_gcc_lt_15 (cu))
+	      || (cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))))
 	{
 	  if (macinfo_type == DW_MACRO_define_strp)
 	    macinfo_type = DW_MACRO_define_strx;
@@ -860,7 +861,8 @@ dwarf_decode_macros (dwarf2_per_objfile *per_objfile,
       mac_ptr++;
 
       if (section_is_gnu && cu->dwo_unit != nullptr
-	  && cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))
+	  && ((cu->per_cu->version () <= 4 && producer_is_gcc_lt_15 (cu))
+	      || (cu->per_cu->version () >= 5 && producer_is_gcc_lt_11 (cu))))
 	{
 	  if (macinfo_type == DW_MACRO_define_strp)
 	    macinfo_type = DW_MACRO_define_strx;
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e5f65ad28f2..6a489502f8b 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7278,6 +7278,16 @@ producer_is_gcc_lt_11 (struct dwarf2_cu *cu)
   return cu->producer_is_gcc_lt_11;
 }
 
+/* See dwarf2/read.h.  */
+bool
+producer_is_gcc_lt_15 (struct dwarf2_cu *cu)
+{
+  if (!cu->checked_producer)
+    check_producer (cu);
+
+  return cu->producer_is_gcc_lt_15;
+}
+
 /* See dwarf2/read.h.  */
 bool
 producer_is_clang (struct dwarf2_cu *cu)
@@ -11310,6 +11320,7 @@ check_producer (struct dwarf2_cu *cu)
       cu->producer_is_gxx_lt_4_6 = major < 4 || (major == 4 && minor < 6);
       cu->producer_is_gcc_lt_4_3 = major < 4 || (major == 4 && minor < 3);
       cu->producer_is_gcc_lt_11 = major < 11;
+      cu->producer_is_gcc_lt_15 = major < 15;
       cu->producer_is_gcc_11 = major == 11;
     }
   else if (producer_is_icc (cu->producer, &major, &minor))
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 7fca859c43d..d61985e4916 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -822,6 +822,10 @@ extern void dwarf2_get_section_info (struct objfile *,
    gcc 11.  */
 extern bool producer_is_gcc_lt_11 (struct dwarf2_cu *cu);
 
+/* Return true if the producer of the inferior is gcc, and earlier than
+   gcc 15.  */
+extern bool producer_is_gcc_lt_15 (struct dwarf2_cu *cu);
+
 /* Return true if the producer of the inferior is clang.  */
 extern bool producer_is_clang (struct dwarf2_cu *cu);
 
diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
index 62304f9b69e..01eb8c9ea84 100644
--- a/gdb/testsuite/gdb.base/fission-macro-i.exp
+++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
@@ -66,10 +66,6 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
 }
 
 foreach_with_prefix dwarf_version {4 5} {
-    if { $dwarf_version == 4 && [gcc_major_version] < 15 } {
-	# Gcc does not contain fix for PR debug/115066.
-	continue
-    }
     foreach_with_prefix dwarf_bits {32 64} {
 	foreach_with_prefix strict_dwarf {0 1} {
 	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 9e5d5c0a0d5..2434a329b7e 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -67,10 +67,6 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
 }
 
 foreach_with_prefix dwarf_version {4 5} {
-    if { $dwarf_version == 4 && [gcc_major_version] < 15 } {
-	# Gcc does not contain fix for PR debug/115066.
-	continue
-    }
     foreach_with_prefix dwarf_bits {32 64} {
 	foreach_with_prefix strict_dwarf {0 1} {
 	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 08/11] [gdb/testsuite] Extend gdb.base/fission-macro.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (5 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 07/11] [gdb/macros] Workaround gcc PR debug/115066 Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 09/11] [gdb/macros] Fix gdb.base/fission-macro.exp with clang Tom de Vries
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

Add a header file to test-case gdb.base/fission-macro.exp, and check that the
macros defined there are properly listed.

Tested on x86_64-linux.

Tested test-case using a current gcc trunk build, and gcc 14.
---
 gdb/testsuite/gdb.base/fission-macro.c   |  2 ++
 gdb/testsuite/gdb.base/fission-macro.exp | 16 +++++++++++++++-
 gdb/testsuite/gdb.base/fission-macro.h   | 19 +++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 gdb/testsuite/gdb.base/fission-macro.h

diff --git a/gdb/testsuite/gdb.base/fission-macro.c b/gdb/testsuite/gdb.base/fission-macro.c
index 9c8cbece5c5..8c34679d57c 100644
--- a/gdb/testsuite/gdb.base/fission-macro.c
+++ b/gdb/testsuite/gdb.base/fission-macro.c
@@ -18,6 +18,8 @@
 #define FIRST 1
 #define SECOND 2
 
+#include "fission-macro.h"
+
 extern int foo (void);
 
 int
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 2434a329b7e..5474baf21d5 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -16,7 +16,7 @@
 # Gcc 14 is the first release containing the fix for PR debug/111409.
 require {expr [gcc_major_version] >= 14}
 
-standard_testfile .c -2.c
+standard_testfile .c -2.c .h
 
 proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
     set opts {}
@@ -56,6 +56,20 @@ proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
     gdb_test "info macro FIRST" "#define FIRST 1"
     gdb_test "info macro SECOND" "#define SECOND 2"
 
+    gdb_test "p FIFTH" " = 5"
+    gdb_test "p SIXTH" " = 6"
+
+    gdb_test "info macro FIFTH" \
+	[multi_line \
+	     "Defined at \[^\r\n\]*$::srcfile3:$::decimal" \
+	     "  included at \[^\r\n\]*$::srcfile:$::decimal" \
+	     "#define FIFTH 5"]
+    gdb_test "info macro SIXTH" \
+	[multi_line \
+	     "Defined at \[^\r\n\]*$::srcfile3:$::decimal" \
+	     "  included at \[^\r\n\]*$::srcfile:$::decimal" \
+	     "#define SIXTH 6"]
+
     gdb_breakpoint foo
     gdb_continue_to_breakpoint "foo"
 
diff --git a/gdb/testsuite/gdb.base/fission-macro.h b/gdb/testsuite/gdb.base/fission-macro.h
new file mode 100644
index 00000000000..66f15483b1c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fission-macro.h
@@ -0,0 +1,19 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2024 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define FIFTH 5
+#define SIXTH 6
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 09/11] [gdb/macros] Fix gdb.base/fission-macro.exp with clang
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (6 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 08/11] [gdb/testsuite] Extend gdb.base/fission-macro.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 10/11] [gdb/testsuite] Use -g3 in gdb.base/lineinc.exp Tom de Vries
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.base/fission-macro.exp with clang, we run into:
...
(gdb) info macro FIFTH^M
Defined at $build/gdb/testsuite/<bad macro file number 2>:18^M
  included at $src/gdb/testsuite/gdb.base/fission-macro.c:21^M
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=4: dwarf_bits=32: \
  strict_dwarf=0: info macro FIFTH
...

This is caused by the fact that the .debug_macros.dwo section refers to the
.debug_line.dwo section, but the .debug_line section is used instead.

Fix this by making sure the .debug_line.dwo section is used.

PR macros/31750
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31750
---
 gdb/dwarf2/read.c                        | 16 ++++++++++++++++
 gdb/testsuite/gdb.base/fission-macro.exp |  6 ++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 6a489502f8b..b742f38c303 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -21224,6 +21224,7 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
   struct dwarf2_section_info *section;
   const char *section_name;
 
+  line_header_up lh_up;
   if (cu->dwo_unit != nullptr)
     {
       if (section_is_gnu)
@@ -21236,6 +21237,21 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
 	  section = &cu->dwo_unit->dwo_file->sections.macinfo;
 	  section_name = ".debug_macinfo.dwo";
 	}
+
+      {
+	struct dwarf2_section_info *line_section;
+
+	line_section = &cu->dwo_unit->dwo_file->sections.line;
+	line_section->read (per_objfile->objfile);
+	if (line_section->buffer == NULL)
+	  {
+	    complaint (_("missing .debug_line.dwo section"));
+	    return;
+	  }
+	lh_up = dwarf_decode_line_header ((sect_offset)0, 0, per_objfile,
+					  line_section, &cu->header, nullptr);
+	lh = lh_up.get ();
+      }
     }
   else
     {
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 5474baf21d5..de1ce7d3823 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -13,8 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-# Gcc 14 is the first release containing the fix for PR debug/111409.
-require {expr [gcc_major_version] >= 14}
+if { [test_compiler_info "gcc-*"] } {
+    # Gcc 14 is the first release containing the fix for PR debug/111409.
+    require {expr [gcc_major_version] >= 14}
+}
 
 standard_testfile .c -2.c .h
 
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 10/11] [gdb/testsuite] Use -g3 in gdb.base/lineinc.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (7 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 09/11] [gdb/macros] Fix gdb.base/fission-macro.exp with clang Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-05-21 15:44 ` [PATCH 11/11] [gdb/testsuite] Don't use readelf in gdb/contrib/cc-with-tweaks.sh Tom de Vries
  2024-06-13 15:40 ` [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

The stated intention of test-case gdb.base/lineinc.exp is:
...
 # Test macro handling of #included files.
...

However, the test-case does not produce any macro debug information.

Fix this by adding macros in the compilation flags.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.base/lineinc.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/lineinc.exp b/gdb/testsuite/gdb.base/lineinc.exp
index 1fe1390d892..490e39bd0fb 100644
--- a/gdb/testsuite/gdb.base/lineinc.exp
+++ b/gdb/testsuite/gdb.base/lineinc.exp
@@ -80,7 +80,8 @@
 
 standard_testfile .c
 
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable {debug}] != ""} {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable \
+	 {debug macros}] != ""} {
     untested "failed to compile"
     return -1
 }
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 11/11] [gdb/testsuite] Don't use readelf in gdb/contrib/cc-with-tweaks.sh
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (8 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 10/11] [gdb/testsuite] Use -g3 in gdb.base/lineinc.exp Tom de Vries
@ 2024-05-21 15:44 ` Tom de Vries
  2024-06-13 15:40 ` [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
  10 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-05-21 15:44 UTC (permalink / raw)
  To: gdb-patches

Readelf is used in gdb/contrib/cc-with-tweaks.sh to find the .dwo files to put
into a .dwp package.

Usage a more basic method for this: assume a .dwo file for each .o file in the
link line.

Verified using shellcheck.

PR/testsuite 31754
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31754
---
 gdb/contrib/cc-with-tweaks.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index f760bd7c0a1..036f3e9d394 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -70,7 +70,6 @@ then
 fi
 
 OBJCOPY=${OBJCOPY:-objcopy}
-READELF=${READELF:-readelf}
 
 DWZ=${DWZ:-dwz}
 DWP=${DWP:-dwp}
@@ -280,14 +279,18 @@ elif [ "$want_multi" = true ]; then
 fi
 
 if [ "$want_dwp" = true ]; then
-    dwo_files=$($READELF -wi "${output_file}" | grep _dwo_name | \
-	sed -e 's/^.*: //' | sort | uniq)
+    dwo_files=()
+    for arg in "$@"; do
+	if echo "$arg" | grep -Eq "\.o$"; then
+	    dwo_files=("${dwo_files[@]}" "${arg/.o/.dwo}")
+	fi
+    done
     rc=0
-    if [ -n "$dwo_files" ]; then
-	$DWP -o "${output_file}.dwp" ${dwo_files} > /dev/null
+    if [ ${#dwo_files[@]} -ne 0 ]; then
+	$DWP -o "${output_file}.dwp" "${dwo_files[@]}" > /dev/null
 	rc=$?
 	[ $rc != 0 ] && exit $rc
-	rm -f ${dwo_files}
+	rm -f "${dwo_files[@]}"
     fi
 fi
 
-- 
2.35.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp
  2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
                   ` (9 preceding siblings ...)
  2024-05-21 15:44 ` [PATCH 11/11] [gdb/testsuite] Don't use readelf in gdb/contrib/cc-with-tweaks.sh Tom de Vries
@ 2024-06-13 15:40 ` Tom de Vries
  2024-06-17  8:16   ` Christophe Lyon
  10 siblings, 1 reply; 16+ messages in thread
From: Tom de Vries @ 2024-06-13 15:40 UTC (permalink / raw)
  To: gdb-patches

On 5/21/24 17:44, Tom de Vries wrote:
> Starting with gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
> macro sections for split DWARF"), available from release gcc 14.1 onwards, gcc
> produces a usable dwarf-5 32-bit .debug_macro.dwo section.
> 
> Add a test-case excercising this.
> 

I went ahead and pushed this patch, since it only adds a test-case.

Thanks,
- Tom

> Tested on x86_64-linux.
> 
> Tested test-case using a current gcc trunk build, and gcc 14.
> ---
>   gdb/testsuite/gdb.base/fission-macro-2.c | 27 +++++++++
>   gdb/testsuite/gdb.base/fission-macro.c   | 27 +++++++++
>   gdb/testsuite/gdb.base/fission-macro.exp | 75 ++++++++++++++++++++++++
>   3 files changed, 129 insertions(+)
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro-2.c
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro.c
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro.exp
> 
> diff --git a/gdb/testsuite/gdb.base/fission-macro-2.c b/gdb/testsuite/gdb.base/fission-macro-2.c
> new file mode 100644
> index 00000000000..fb088c8bfaf
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro-2.c
> @@ -0,0 +1,27 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> +   Copyright 2024 Free Software Foundation, Inc.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#define THIRD 3
> +#define FOURTH 4
> +
> +extern int foo (void);
> +
> +int
> +foo (void)
> +{
> +  return 0;
> +}
> diff --git a/gdb/testsuite/gdb.base/fission-macro.c b/gdb/testsuite/gdb.base/fission-macro.c
> new file mode 100644
> index 00000000000..9c8cbece5c5
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro.c
> @@ -0,0 +1,27 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> +   Copyright 2024 Free Software Foundation, Inc.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#define FIRST 1
> +#define SECOND 2
> +
> +extern int foo (void);
> +
> +int
> +main (void)
> +{
> +  return foo ();
> +}
> diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
> new file mode 100644
> index 00000000000..705e3dd0c4b
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro.exp
> @@ -0,0 +1,75 @@
> +# Copyright 2024 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +# Gcc 14 is the first release containing the fix for PR debug/111409.
> +require {expr [gcc_major_version] >= 14}
> +
> +standard_testfile .c -2.c
> +
> +proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
> +    set opts {}
> +    lappend opts debug
> +    lappend opts quiet
> +    lappend opts additional_flags=-gsplit-dwarf
> +    lappend opts macros
> +
> +    if { $dwarf_bits == 64 } {
> +	lappend opts additional_flags=-gdwarf64
> +    }
> +
> +    if { $strict_dwarf } {
> +	lappend opts additional_flags=-gstrict-dwarf
> +    }
> +
> +    lappend opts additional_flags=-gdwarf-$dwarf_version
> +
> +    set id v$dwarf_version-b$dwarf_bits-s$strict_dwarf
> +
> +    set srcfiles [list $::srcfile $::srcfile2]
> +    if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
> +	return -1
> +    }
> +
> +    clean_restart
> +
> +    gdb_load_no_complaints $::binfile-$id
> +
> +    if {![runto_main]} {
> +	return 0
> +    }
> +
> +    gdb_test "p FIRST" " = 1"
> +    gdb_test "p SECOND" " = 2"
> +
> +    gdb_test "info macro FIRST" "#define FIRST 1"
> +    gdb_test "info macro SECOND" "#define SECOND 2"
> +
> +    gdb_breakpoint foo
> +    gdb_continue_to_breakpoint "foo"
> +
> +    gdb_test "p THIRD" " = 3"
> +    gdb_test "p FOURTH" " = 4"
> +
> +    gdb_test "info macro THIRD" "#define THIRD 3"
> +    gdb_test "info macro FOURTH" "#define FOURTH 4"
> +}
> +
> +foreach_with_prefix dwarf_version {5} {
> +    foreach_with_prefix dwarf_bits {32} {
> +	foreach_with_prefix strict_dwarf {0 1} {
> +	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
> +	}
> +    }
> +}
> 
> base-commit: 05887e360ad3db3265e3dc2f7a845660d1d3c02f


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp
  2024-05-21 15:44 ` [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp Tom de Vries
@ 2024-06-13 16:27   ` Tom de Vries
  0 siblings, 0 replies; 16+ messages in thread
From: Tom de Vries @ 2024-06-13 16:27 UTC (permalink / raw)
  To: gdb-patches

On 5/21/24 17:44, Tom de Vries wrote:
> We can exercise test-case gdb.base/fission-macro.exp using gcc release 14.
> 
> We cannot use the test-case with a gcc release earlier than gcc 14, because
> it's missing gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
> macro sections for split DWARF").
> 
> A way to work around this is to use a .i file instead of a .c file.  Add a
> test-case using this approach.
> 
> This allows use to excercise gcc 11-13 in addition.
> 
> Tested on x86_64-linux.
> 

I'm having second thoughts on this and the following 2 patches, all 
using gdb.base/fission-macro-i.i.

While this adds a way to test gdb functionality in combination with gcc 
< 14, the actual use-cases for which the following two workaround 
patches will be useful will be severely limited, so I'm not sure it's 
worth the added complexity and maintenance burden of the workarounds.

So, I'm considering dropping these 3.

Thanks,
- Tom

> Tested test-case using a current gcc trunk build and gcc 11-14.
> ---
>   gdb/testsuite/gdb.base/fission-macro-i-2.i | 27 ++++++++
>   gdb/testsuite/gdb.base/fission-macro-i.exp | 77 ++++++++++++++++++++++
>   gdb/testsuite/gdb.base/fission-macro-i.i   | 27 ++++++++
>   3 files changed, 131 insertions(+)
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro-i-2.i
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro-i.exp
>   create mode 100644 gdb/testsuite/gdb.base/fission-macro-i.i
> 
> diff --git a/gdb/testsuite/gdb.base/fission-macro-i-2.i b/gdb/testsuite/gdb.base/fission-macro-i-2.i
> new file mode 100644
> index 00000000000..fb088c8bfaf
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro-i-2.i
> @@ -0,0 +1,27 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> +   Copyright 2024 Free Software Foundation, Inc.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#define THIRD 3
> +#define FOURTH 4
> +
> +extern int foo (void);
> +
> +int
> +foo (void)
> +{
> +  return 0;
> +}
> diff --git a/gdb/testsuite/gdb.base/fission-macro-i.exp b/gdb/testsuite/gdb.base/fission-macro-i.exp
> new file mode 100644
> index 00000000000..bf1ca206a6c
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro-i.exp
> @@ -0,0 +1,77 @@
> +# Copyright 2024 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +# Gcc 11 is the first release containing the fix for PR debug/99319.
> +require {expr [gcc_major_version] >= 11}
> +
> +# Use a .i file instead of a .c file, to make sure that we only generate one
> +# .debug_macros section, working around gcc PR debug/111409.
> +standard_testfile .i -2.i
> +
> +proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
> +    set opts {}
> +    lappend opts debug
> +    lappend opts quiet
> +    lappend opts additional_flags=-gsplit-dwarf
> +    lappend opts macros
> +
> +    if { $dwarf_bits == 64 } {
> +	lappend opts additional_flags=-gdwarf64
> +    }
> +
> +    if { $strict_dwarf } {
> +	lappend opts additional_flags=-gstrict-dwarf
> +    }
> +
> +    lappend opts additional_flags=-gdwarf-$dwarf_version
> +
> +    set id v$dwarf_version-b$dwarf_bits-s$strict_dwarf
> +
> +    set srcfiles [list $::srcfile $::srcfile2]
> +    if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
> +	return -1
> +    }
> +
> +    clean_restart
> +
> +    gdb_load_no_complaints $::binfile-$id
> +
> +    if {![runto_main]} {
> +	return 0
> +    }
> +
> +    gdb_test "p FIRST" " = 1"
> +    gdb_test "p SECOND" " = 2"
> +
> +    gdb_test "info macro FIRST" "#define FIRST 1"
> +    gdb_test "info macro SECOND" "#define SECOND 2"
> +
> +    gdb_breakpoint foo
> +    gdb_continue_to_breakpoint "foo"
> +
> +    gdb_test "p THIRD" " = 3"
> +    gdb_test "p FOURTH" " = 4"
> +
> +    gdb_test "info macro THIRD" "#define THIRD 3"
> +    gdb_test "info macro FOURTH" "#define FOURTH 4"
> +}
> +
> +foreach_with_prefix dwarf_version {5} {
> +    foreach_with_prefix dwarf_bits {32 64} {
> +	foreach_with_prefix strict_dwarf {0 1} {
> +	    do_tests $dwarf_version $dwarf_bits $strict_dwarf
> +	}
> +    }
> +}
> diff --git a/gdb/testsuite/gdb.base/fission-macro-i.i b/gdb/testsuite/gdb.base/fission-macro-i.i
> new file mode 100644
> index 00000000000..9c8cbece5c5
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/fission-macro-i.i
> @@ -0,0 +1,27 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> +   Copyright 2024 Free Software Foundation, Inc.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#define FIRST 1
> +#define SECOND 2
> +
> +extern int foo (void);
> +
> +int
> +main (void)
> +{
> +  return foo ();
> +}


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp
  2024-06-13 15:40 ` [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
@ 2024-06-17  8:16   ` Christophe Lyon
  2024-06-17  8:23     ` Tom de Vries
  0 siblings, 1 reply; 16+ messages in thread
From: Christophe Lyon @ 2024-06-17  8:16 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

Hi Tom,

On Thu, 13 Jun 2024 at 17:40, Tom de Vries <tdevries@suse.de> wrote:
>
> On 5/21/24 17:44, Tom de Vries wrote:
> > Starting with gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
> > macro sections for split DWARF"), available from release gcc 14.1 onwards, gcc
> > produces a usable dwarf-5 32-bit .debug_macro.dwo section.
> >
> > Add a test-case excercising this.
> >
>
> I went ahead and pushed this patch, since it only adds a test-case.
>

As you may have noticed, this patch was flagged by our CI on arm:
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=0: info macro FIRST
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=0: info macro FOURTH
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=0: info macro SECOND
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=0: info macro THIRD
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=1: info macro FIRST
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=1: info macro FOURTH
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=1: info macro SECOND
FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
strict_dwarf=1: info macro THIRD


From gdb.log I can see:
info macro FIRST
Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
-DFIRST=1
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
dwarf_bits=32: strict_dwarf=0: info macro FIRST
info macro SECOND
Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
-DSECOND=2
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
dwarf_bits=32: strict_dwarf=0: info macro SECOND

info macro THIRD
Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
-DTHIRD=3
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
dwarf_bits=32: strict_dwarf=0: info macro THIRD
info macro FOURTH
Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
-DFOURTH=4
(gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
dwarf_bits=32: strict_dwarf=0: info macro FOURTH


I've also noticed:
get_compiler_info: gcc-15-0-0

(which is expected, this CI loop is using trunk GCC)

Does this help?

Thanks,

Christophe

> Thanks,
> - Tom
>
> > Tested on x86_64-linux.
> >
> > Tested test-case using a current gcc trunk build, and gcc 14.
> > ---
> >   gdb/testsuite/gdb.base/fission-macro-2.c | 27 +++++++++
> >   gdb/testsuite/gdb.base/fission-macro.c   | 27 +++++++++
> >   gdb/testsuite/gdb.base/fission-macro.exp | 75 ++++++++++++++++++++++++
> >   3 files changed, 129 insertions(+)
> >   create mode 100644 gdb/testsuite/gdb.base/fission-macro-2.c
> >   create mode 100644 gdb/testsuite/gdb.base/fission-macro.c
> >   create mode 100644 gdb/testsuite/gdb.base/fission-macro.exp
> >
> > diff --git a/gdb/testsuite/gdb.base/fission-macro-2.c b/gdb/testsuite/gdb.base/fission-macro-2.c
> > new file mode 100644
> > index 00000000000..fb088c8bfaf
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.base/fission-macro-2.c
> > @@ -0,0 +1,27 @@
> > +/* This testcase is part of GDB, the GNU debugger.
> > +
> > +   Copyright 2024 Free Software Foundation, Inc.
> > +
> > +   This program is free software; you can redistribute it and/or modify
> > +   it under the terms of the GNU General Public License as published by
> > +   the Free Software Foundation; either version 3 of the License, or
> > +   (at your option) any later version.
> > +
> > +   This program is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +   GNU General Public License for more details.
> > +
> > +   You should have received a copy of the GNU General Public License
> > +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> > +
> > +#define THIRD 3
> > +#define FOURTH 4
> > +
> > +extern int foo (void);
> > +
> > +int
> > +foo (void)
> > +{
> > +  return 0;
> > +}
> > diff --git a/gdb/testsuite/gdb.base/fission-macro.c b/gdb/testsuite/gdb.base/fission-macro.c
> > new file mode 100644
> > index 00000000000..9c8cbece5c5
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.base/fission-macro.c
> > @@ -0,0 +1,27 @@
> > +/* This testcase is part of GDB, the GNU debugger.
> > +
> > +   Copyright 2024 Free Software Foundation, Inc.
> > +
> > +   This program is free software; you can redistribute it and/or modify
> > +   it under the terms of the GNU General Public License as published by
> > +   the Free Software Foundation; either version 3 of the License, or
> > +   (at your option) any later version.
> > +
> > +   This program is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +   GNU General Public License for more details.
> > +
> > +   You should have received a copy of the GNU General Public License
> > +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> > +
> > +#define FIRST 1
> > +#define SECOND 2
> > +
> > +extern int foo (void);
> > +
> > +int
> > +main (void)
> > +{
> > +  return foo ();
> > +}
> > diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
> > new file mode 100644
> > index 00000000000..705e3dd0c4b
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.base/fission-macro.exp
> > @@ -0,0 +1,75 @@
> > +# Copyright 2024 Free Software Foundation, Inc.
> > +
> > +# This program is free software; you can redistribute it and/or modify
> > +# it under the terms of the GNU General Public License as published by
> > +# the Free Software Foundation; either version 3 of the License, or
> > +# (at your option) any later version.
> > +#
> > +# This program is distributed in the hope that it will be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> > +
> > +# Gcc 14 is the first release containing the fix for PR debug/111409.
> > +require {expr [gcc_major_version] >= 14}
> > +
> > +standard_testfile .c -2.c
> > +
> > +proc do_tests { dwarf_version dwarf_bits strict_dwarf } {
> > +    set opts {}
> > +    lappend opts debug
> > +    lappend opts quiet
> > +    lappend opts additional_flags=-gsplit-dwarf
> > +    lappend opts macros
> > +
> > +    if { $dwarf_bits == 64 } {
> > +     lappend opts additional_flags=-gdwarf64
> > +    }
> > +
> > +    if { $strict_dwarf } {
> > +     lappend opts additional_flags=-gstrict-dwarf
> > +    }
> > +
> > +    lappend opts additional_flags=-gdwarf-$dwarf_version
> > +
> > +    set id v$dwarf_version-b$dwarf_bits-s$strict_dwarf
> > +
> > +    set srcfiles [list $::srcfile $::srcfile2]
> > +    if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
> > +     return -1
> > +    }
> > +
> > +    clean_restart
> > +
> > +    gdb_load_no_complaints $::binfile-$id
> > +
> > +    if {![runto_main]} {
> > +     return 0
> > +    }
> > +
> > +    gdb_test "p FIRST" " = 1"
> > +    gdb_test "p SECOND" " = 2"
> > +
> > +    gdb_test "info macro FIRST" "#define FIRST 1"
> > +    gdb_test "info macro SECOND" "#define SECOND 2"
> > +
> > +    gdb_breakpoint foo
> > +    gdb_continue_to_breakpoint "foo"
> > +
> > +    gdb_test "p THIRD" " = 3"
> > +    gdb_test "p FOURTH" " = 4"
> > +
> > +    gdb_test "info macro THIRD" "#define THIRD 3"
> > +    gdb_test "info macro FOURTH" "#define FOURTH 4"
> > +}
> > +
> > +foreach_with_prefix dwarf_version {5} {
> > +    foreach_with_prefix dwarf_bits {32} {
> > +     foreach_with_prefix strict_dwarf {0 1} {
> > +         do_tests $dwarf_version $dwarf_bits $strict_dwarf
> > +     }
> > +    }
> > +}
> >
> > base-commit: 05887e360ad3db3265e3dc2f7a845660d1d3c02f
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp
  2024-06-17  8:16   ` Christophe Lyon
@ 2024-06-17  8:23     ` Tom de Vries
  2024-06-17  8:43       ` Christophe Lyon
  0 siblings, 1 reply; 16+ messages in thread
From: Tom de Vries @ 2024-06-17  8:23 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: gdb-patches

On 6/17/24 10:16, Christophe Lyon wrote:
> Hi Tom,
> 
> On Thu, 13 Jun 2024 at 17:40, Tom de Vries <tdevries@suse.de> wrote:
>>
>> On 5/21/24 17:44, Tom de Vries wrote:
>>> Starting with gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
>>> macro sections for split DWARF"), available from release gcc 14.1 onwards, gcc
>>> produces a usable dwarf-5 32-bit .debug_macro.dwo section.
>>>
>>> Add a test-case excercising this.
>>>
>>
>> I went ahead and pushed this patch, since it only adds a test-case.
>>
> 
> As you may have noticed, this patch was flagged by our CI on arm:
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=0: info macro FIRST
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=0: info macro FOURTH
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=0: info macro SECOND
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=0: info macro THIRD
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=1: info macro FIRST
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=1: info macro FOURTH
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=1: info macro SECOND
> FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> strict_dwarf=1: info macro THIRD
> 
> 
>  From gdb.log I can see:
> info macro FIRST
> Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
> -DFIRST=1
> (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> dwarf_bits=32: strict_dwarf=0: info macro FIRST
> info macro SECOND
> Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
> -DSECOND=2
> (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> dwarf_bits=32: strict_dwarf=0: info macro SECOND
> 
> info macro THIRD
> Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
> -DTHIRD=3
> (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> dwarf_bits=32: strict_dwarf=0: info macro THIRD
> info macro FOURTH
> Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
> -DFOURTH=4
> (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> dwarf_bits=32: strict_dwarf=0: info macro FOURTH
> 
> 
> I've also noticed:
> get_compiler_info: gcc-15-0-0
> 
> (which is expected, this CI loop is using trunk GCC)
> 
> Does this help?

Hi Christophe,

Thanks for the info.

Indeed I already noticed it, and filed this PR ( 
https://sourceware.org/bugzilla/show_bug.cgi?id=31897 ) to track it.

I managed to reproduce it, and AFAICT it's fixed by the following patch 
in the patch series (something I didn't realize when committing, because 
this FAIL occurs only on 32-bit targets).

Sorry for the noise.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp
  2024-06-17  8:23     ` Tom de Vries
@ 2024-06-17  8:43       ` Christophe Lyon
  0 siblings, 0 replies; 16+ messages in thread
From: Christophe Lyon @ 2024-06-17  8:43 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

On Mon, 17 Jun 2024 at 10:22, Tom de Vries <tdevries@suse.de> wrote:
>
> On 6/17/24 10:16, Christophe Lyon wrote:
> > Hi Tom,
> >
> > On Thu, 13 Jun 2024 at 17:40, Tom de Vries <tdevries@suse.de> wrote:
> >>
> >> On 5/21/24 17:44, Tom de Vries wrote:
> >>> Starting with gcc commit 80048aa13a6 ("debug/111409 - don't generate COMDAT
> >>> macro sections for split DWARF"), available from release gcc 14.1 onwards, gcc
> >>> produces a usable dwarf-5 32-bit .debug_macro.dwo section.
> >>>
> >>> Add a test-case excercising this.
> >>>
> >>
> >> I went ahead and pushed this patch, since it only adds a test-case.
> >>
> >
> > As you may have noticed, this patch was flagged by our CI on arm:
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=0: info macro FIRST
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=0: info macro FOURTH
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=0: info macro SECOND
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=0: info macro THIRD
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=1: info macro FIRST
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=1: info macro FOURTH
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=1: info macro SECOND
> > FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32:
> > strict_dwarf=1: info macro THIRD
> >
> >
> >  From gdb.log I can see:
> > info macro FIRST
> > Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
> > -DFIRST=1
> > (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> > dwarf_bits=32: strict_dwarf=0: info macro FIRST
> > info macro SECOND
> > Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro.c:0
> > -DSECOND=2
> > (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> > dwarf_bits=32: strict_dwarf=0: info macro SECOND
> >
> > info macro THIRD
> > Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
> > -DTHIRD=3
> > (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> > dwarf_bits=32: strict_dwarf=0: info macro THIRD
> > info macro FOURTH
> > Defined at /home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.base/fission-macro-2.c:0
> > -DFOURTH=4
> > (gdb) FAIL: gdb.base/fission-macro.exp: dwarf_version=5:
> > dwarf_bits=32: strict_dwarf=0: info macro FOURTH
> >
> >
> > I've also noticed:
> > get_compiler_info: gcc-15-0-0
> >
> > (which is expected, this CI loop is using trunk GCC)
> >
> > Does this help?
>
> Hi Christophe,
>
> Thanks for the info.
>
> Indeed I already noticed it, and filed this PR (
> https://sourceware.org/bugzilla/show_bug.cgi?id=31897 ) to track it.
>
> I managed to reproduce it, and AFAICT it's fixed by the following patch
> in the patch series (something I didn't realize when committing, because
> this FAIL occurs only on 32-bit targets).
>
> Sorry for the noise.
>

Thanks for the pointer, I had missed it.

Christophe

> Thanks,
> - Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-06-17  8:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21 15:44 [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
2024-05-21 15:44 ` [PATCH 02/11] [gdb/macros] Handle 64-bit dwarf in gdb.base/fission-macro.exp Tom de Vries
2024-05-21 15:44 ` [PATCH 03/11] [gdb/testsuite] Add test-case gdb.base/fission-macro-i.exp Tom de Vries
2024-06-13 16:27   ` Tom de Vries
2024-05-21 15:44 ` [PATCH 04/11] [gdb/macros] Work around gcc PR debug/99319 Tom de Vries
2024-05-21 15:44 ` [PATCH 05/11] [gdb/macros] Work around a gcc PR fixed in gcc 9 Tom de Vries
2024-05-21 15:44 ` [PATCH 06/11] [gdb/macros] Handle v4 dwarf in gdb.base/fission-macro.exp Tom de Vries
2024-05-21 15:44 ` [PATCH 07/11] [gdb/macros] Workaround gcc PR debug/115066 Tom de Vries
2024-05-21 15:44 ` [PATCH 08/11] [gdb/testsuite] Extend gdb.base/fission-macro.exp Tom de Vries
2024-05-21 15:44 ` [PATCH 09/11] [gdb/macros] Fix gdb.base/fission-macro.exp with clang Tom de Vries
2024-05-21 15:44 ` [PATCH 10/11] [gdb/testsuite] Use -g3 in gdb.base/lineinc.exp Tom de Vries
2024-05-21 15:44 ` [PATCH 11/11] [gdb/testsuite] Don't use readelf in gdb/contrib/cc-with-tweaks.sh Tom de Vries
2024-06-13 15:40 ` [PATCH 01/11] [gdb/testsuite] Add gdb.base/fission-macro.exp Tom de Vries
2024-06-17  8:16   ` Christophe Lyon
2024-06-17  8:23     ` Tom de Vries
2024-06-17  8:43       ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).