public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
* [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
@ 2021-08-01 20:56 slyfox at inbox dot ru
  2021-08-01 20:58 ` [Bug debugedit/28161] " slyfox at inbox dot ru
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: slyfox at inbox dot ru @ 2021-08-01 20:56 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

            Bug ID: 28161
           Summary: debugedit fails test against gcc git/binutils-2.37:
                    [debugedit 5.0] testsuite: 17 19 21 failed
           Product: debugedit
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debugedit
          Assignee: unassigned at sourceware dot org
          Reporter: slyfox at inbox dot ru
                CC: debugedit at sourceware dot org
  Target Milestone: ---

Tests fail as:

debugedit

  1: debugedit help                                  ok
  2: debugedit usage                                 ok
  3: debugedit executable                            ok
  4: debugedit .debug_str objects DWARF4             ok
  5: debugedit .debug_str/line_str objects DWARF5    ok
  6: debugedit .debug_str partial DWARF4             ok
  7: debugedit .debug_str/line_str partial DWARF5    ok
  8: debugedit .debug_str exe DWARF4                 ok
  9: debugedit .debug_str/line_str exe DWARF5        ok
 10: debugedit .debug_info objects                   ok
 11: debugedit .debug_info partial                   ok
 12: debugedit .debug_info exe                       ok
 13: debugedit .debug_types objects                  ok
 14: debugedit .debug_types partial                  ok
 15: debugedit .debug_types exe                      ok
 16: debugedit .debug_line objects DWARF4            ok
 17: debugedit .debug_line objects DWARF5            FAILED (debugedit.at:501)
 18: debugedit .debug_line partial DWARF4            ok
 19: debugedit .debug_line partial DWARF5            FAILED (debugedit.at:546)
 20: debugedit .debug_line exe DWARF4                ok
 21: debugedit .debug_line exe DWARF5                FAILED (debugedit.at:591)
 22: debugedit .debug_macro objects                  ok
 23: debugedit .debug_macro partial                  ok
 24: debugedit .debug_macro exe                      ok
 25: debugedit --list-file DWARF4                    ok
 26: debugedit --list-file DWARF5                    ok

## ------------- ##
## Test results. ##
## ------------- ##

ERROR: All 26 tests were run,
3 failed unexpectedly.

Somewhat fresh gcc, binutils-2.37:

$ LANG=C h gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/tmp/portage-tmpdir/portage/sys-devel/gcc-12.0.0_pre9999/work/gcc-12.0.0_pre9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/12.0.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.0/include/g++-v12
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/12.0.0/python
--enable-languages=c,c++,d,go,jit,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 12.0.0_pre9999
p2, commit 1121e495b70105deeb82295f8210e30f2080bc37' --disable-esp
--enable-libstdcxx-time --enable-host-shared --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--enable-systemtap --enable-valgrind-annotations --enable-vtable-verify
--with-zstd --enable-lto --with-isl --disable-isl-version-check
--enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210728 (experimental) (Gentoo 12.0.0_pre9999 p2, commit
1121e495b70105deeb82295f8210e30f2080bc37)


Looking tests/testsuite.dir/17 failure example:

tests/testsuite.dir/17 $ cat testsuite.log
#                             -*- compilation -*-
17. debugedit.at:488: testing debugedit .debug_line objects DWARF5 ...
./debugedit.at:498: debugedit -b $(pwd) -d /foo/bar/baz ./foo.o
./debugedit.at:499: debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o
./debugedit.at:500: debugedit -b $(pwd) -d /foo/bar/baz ./baz.o
./debugedit.at:501:
$READELF --debug-dump=line foo.o subdir_bar/bar.o baz.o \
        | grep -A5 "The Directory Table" | grep "^  [123]" \
        | cut -f2- -d/ | grep ^foo/ | sort

--- expout      2021-08-01 21:53:10.763723255 +0100
+++ /home/slyfox/dev/git/debugedit/tests/testsuite.dir/at-groups/17/stdout     
2021-08-01 21:53:10.768723312 +0100
@@ -1,2 +1 @@
-foo/bar/baz
 foo/bar/baz/subdir_headers
17. debugedit.at:488: 17. debugedit .debug_line objects DWARF5
(debugedit.at:488): FAILED (debugedit.at:501)

Running manually:

$ LANG=C x86_64-pc-linux-gnu-readelf --debug-dump=line foo.o subdir_bar/bar.o
baz.o         | grep -A10 "The Directory Table"
 The Directory Table (offset 0x22, lines 4, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x4f): /foo/bar/baz
  1     (indirect line string, offset: 0x35): subdir_foo
  2     (indirect line string, offset: 0x40): subdir_headers
  3     (indirect line string, offset: 0x11): /usr/include

 The File Name Table (offset 0x38, lines 4, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x0): subdir_foo/foo.c
  1     1       (indirect line string, offset: 0xb): foo.c
--
 The Directory Table (offset 0x22, lines 3, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x2a): /foo/bar/baz/subdir_bar
  1     (indirect line string, offset: 0x42): ../subdir_headers
  2     (indirect line string, offset: 0x6): /usr/include

 The File Name Table (offset 0x34, lines 4, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x0): bar.c
  1     0       (indirect line string, offset: 0x0): bar.c
  2     1       (indirect line string, offset: 0x21): foobar.h
--
 The Directory Table (offset 0x22, lines 3, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x53): /foo/bar/baz
  1     (indirect line string, offset: 0x37): /foo/bar/baz/subdir_headers
  2     (indirect line string, offset: 0x13): /usr/include

 The File Name Table (offset 0x34, lines 4, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x0): /foo/bar/baz/baz.c
  1     0       (indirect line string, offset: 0xd): baz.c
  2     1       (indirect line string, offset: 0x2e): foobar.h

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
@ 2021-08-01 20:58 ` slyfox at inbox dot ru
  2021-08-01 21:08 ` mark at klomp dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: slyfox at inbox dot ru @ 2021-08-01 20:58 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Created attachment 13572
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13572&action=edit
testsuite.dir.tar.gz

testsuite.dir.tar.gz is a full directory with failed tests (binaries, sources,
logs).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
  2021-08-01 20:58 ` [Bug debugedit/28161] " slyfox at inbox dot ru
@ 2021-08-01 21:08 ` mark at klomp dot org
  2021-08-01 21:18 ` slyfox at inbox dot ru
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2021-08-01 21:08 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
Could you try:
https://sourceware.org/pipermail/debugedit/2021-July/000110.html

That one isn't 100% correct since it breaks on some older gcc versions where
-gdwarf-5 generates DWARF5 plus DWARF4 .debug_line.

But I suspect we are looking at the same issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
  2021-08-01 20:58 ` [Bug debugedit/28161] " slyfox at inbox dot ru
  2021-08-01 21:08 ` mark at klomp dot org
@ 2021-08-01 21:18 ` slyfox at inbox dot ru
  2021-08-02 22:44 ` mark at klomp dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: slyfox at inbox dot ru @ 2021-08-01 21:18 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

--- Comment #3 from Sergei Trofimovich <slyfox at inbox dot ru> ---
(In reply to Mark Wielaard from comment #2)
> Could you try:
> https://sourceware.org/pipermail/debugedit/2021-July/000110.html
> 
> That one isn't 100% correct since it breaks on some older gcc versions where
> -gdwarf-5 generates DWARF5 plus DWARF4 .debug_line.
> 
> But I suspect we are looking at the same issue.

All tests pass with it!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
                   ` (2 preceding siblings ...)
  2021-08-01 21:18 ` slyfox at inbox dot ru
@ 2021-08-02 22:44 ` mark at klomp dot org
  2021-08-03 22:07 ` slyfox at inbox dot ru
  2021-08-04  9:44 ` mark at klomp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2021-08-02 22:44 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-02
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Sergei Trofimovich from comment #3)
> (In reply to Mark Wielaard from comment #2)
> > Could you try:
> > https://sourceware.org/pipermail/debugedit/2021-July/000110.html
> > 
> > That one isn't 100% correct since it breaks on some older gcc versions where
> > -gdwarf-5 generates DWARF5 plus DWARF4 .debug_line.
> > 
> > But I suspect we are looking at the same issue.
> 
> All tests pass with it!

Thanks for testing. Would you be able to also test V2 of the patch? It should
be almost identical, but contains a configure check to make sure gcc really
produces a DWARFv5 .debug_line section (and otherwise skips the test).

https://sourceware.org/pipermail/debugedit/2021-August/000118.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
                   ` (3 preceding siblings ...)
  2021-08-02 22:44 ` mark at klomp dot org
@ 2021-08-03 22:07 ` slyfox at inbox dot ru
  2021-08-04  9:44 ` mark at klomp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: slyfox at inbox dot ru @ 2021-08-03 22:07 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

--- Comment #5 from Sergei Trofimovich <slyfox at inbox dot ru> ---
(In reply to Mark Wielaard from comment #4)
> (In reply to Sergei Trofimovich from comment #3)
> > (In reply to Mark Wielaard from comment #2)
> > > Could you try:
> > > https://sourceware.org/pipermail/debugedit/2021-July/000110.html
> > > 
> > > That one isn't 100% correct since it breaks on some older gcc versions where
> > > -gdwarf-5 generates DWARF5 plus DWARF4 .debug_line.
> > > 
> > > But I suspect we are looking at the same issue.
> > 
> > All tests pass with it!
> 
> Thanks for testing. Would you be able to also test V2 of the patch? It
> should be almost identical, but contains a configure check to make sure gcc
> really produces a DWARFv5 .debug_line section (and otherwise skips the test).
> 
> https://sourceware.org/pipermail/debugedit/2021-August/000118.html

All tests pass with this change as well!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debugedit/28161] debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed
  2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
                   ` (4 preceding siblings ...)
  2021-08-03 22:07 ` slyfox at inbox dot ru
@ 2021-08-04  9:44 ` mark at klomp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2021-08-04  9:44 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=28161

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
commit ae27211cbbfb63a0ad3c141cd1310d7f583ec40e
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Jul 30 18:09:46 2021 +0200

    tests: Handle zero directory entry in .debug_line DWARF5 debugedit.at

    We were skipping the zero directory entry, because it was always
    the same as the directory entry at position one. But that isn't
    true anymore with gcc 11.2.1. There the zero dir entry is unique.
    Fix the debugedit.at .debug_line testcases using DWARF5 to also
    include dir entry zero.

    Signed-off-by: Mark Wielaard <mark@klomp.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-08-04  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 20:56 [Bug debugedit/28161] New: debugedit fails test against gcc git/binutils-2.37: [debugedit 5.0] testsuite: 17 19 21 failed slyfox at inbox dot ru
2021-08-01 20:58 ` [Bug debugedit/28161] " slyfox at inbox dot ru
2021-08-01 21:08 ` mark at klomp dot org
2021-08-01 21:18 ` slyfox at inbox dot ru
2021-08-02 22:44 ` mark at klomp dot org
2021-08-03 22:07 ` slyfox at inbox dot ru
2021-08-04  9:44 ` mark at klomp dot org

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).