]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Force DWARF in gdb.pascal
authorTom de Vries <tdevries@suse.de>
Mon, 10 Nov 2025 18:36:46 +0000 (19:36 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 10 Nov 2025 18:36:46 +0000 (19:36 +0100)
On i686-linux (and likewise arm-linux), I run into:
...
(gdb) file str-chars^M
Reading symbols from str-chars...^M
warning: stabs debug information is not supported.^M
(No debugging symbols found in str-chars)^M
(gdb) delete breakpoints^M
...

Fix this by using fpc option -gw2.

Tested on i686-linux.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
PR testsuite/33564
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33564

gdb/testsuite/lib/pascal.exp

index 12f8a2f0f27a67ef55a694474cc985161da94e4a..09af7bd48bf3a11f6868a5a093203e5c5478ea75 100644 (file)
@@ -128,7 +128,9 @@ proc fpc_compile {source destfile type options} {
            if {[board_info $dest exists debug_flags]} {
                append add_flags " [board_info $dest debug_flags]"
            } else {
-               append add_flags " -g"
+               # GDB no longer supports STABS, so force DWARF debug info.
+               # Use v2 assuming support is more mature than later versions.
+               append add_flags " -g -gw2"
            }
        }
        if { $i == "class" } {