public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
@ 2020-04-01 15:43 vries at gcc dot gnu.org
  2020-04-01 17:42 ` [Bug testsuite/25760] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-01 15:43 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 25760
           Summary: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print
                    last_node_id after calling pn (timeout)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running test-case gdb.ada/call_pn.exp with target board
unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects and gcc-9, I run into:
...
(gdb) print last_node_id^M
Multiple matches for last_node_id^M
[0] cancel^M
[1] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
[2] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
> FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
...

And with this patch added:
...
diff --git a/gdb/testsuite/gdb.ada/call_pn.exp
b/gdb/testsuite/gdb.ada/call_pn.exp
index b21de4da7c..e4ccfeb2c7 100644
--- a/gdb/testsuite/gdb.ada/call_pn.exp
+++ b/gdb/testsuite/gdb.ada/call_pn.exp
@@ -29,6 +29,8 @@ if ![runto "foo.adb:$bp_location" ] then {
   return
 }

+gdb_test "maint expand-symtabs"
+
 # Make sure that last_node_id is set to zero...
 gdb_test "print last_node_id" "= 0" "print last_node_id before calling pn"

...
we get even more fails:
...
(gdb) PASS: gdb.ada/call_pn.exp: maint expand-symtabs
print last_node_id^M
Multiple matches for last_node_id^M
[0] cancel^M
[1] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
[2] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
> FAIL: gdb.ada/call_pn.exp: print last_node_id before calling pn (timeout)
print pn (4321)^M
Argument must be choice number^M
(gdb) FAIL: gdb.ada/call_pn.exp: print pn (4321)
print last_node_id^M
Multiple matches for last_node_id^M
[0] cancel^M
[1] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
[2] pck.last_node_id at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
> FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
...

The basic problem is that there's only one symbol in the sources, but here are
two listed in the debug info: the concrete and the abstract.

Then gdb does it's fancy thing of coupling the abstract symbol with the minimal
symbol addres (see also PR25755), and now it has two concrete symbols. Normally
that doesn't cause trouble, since we find one or the other, giving us the same
type and address, but in ada there's a difference in finding one or two
symbols: if there's just one, we print the value, if there are two, gdb asks
which one you meant.

I consider this a gcc bug, I'll file one.

Note: if we fix PR25759 - "Remove useless decls from symtab" these FAILs may
disappear.

Note: we could work around these FAILs by using the "maint set
symbol-store-decls off" proposed in PR25755.

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
@ 2020-04-01 17:42 ` vries at gcc dot gnu.org
  2020-04-01 21:52 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-01 17:42 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Now also reproduced with gcc-10.

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
  2020-04-01 17:42 ` [Bug testsuite/25760] " vries at gcc dot gnu.org
@ 2020-04-01 21:52 ` vries at gcc dot gnu.org
  2020-04-08  4:58 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-01 21:52 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> I consider this a gcc bug, I'll file one.
> 

PR gcc/94450 - "lto abstract variable emitted as concrete decl"  (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94450 ).

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
  2020-04-01 17:42 ` [Bug testsuite/25760] " vries at gcc dot gnu.org
  2020-04-01 21:52 ` vries at gcc dot gnu.org
@ 2020-04-08  4:58 ` cvs-commit at gcc dot gnu.org
  2020-04-08  5:04 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-08  4:58 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e21d048f8ad95002e61aec25160fa6fabfab21a4

commit e21d048f8ad95002e61aec25160fa6fabfab21a4
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Apr 8 06:57:56 2020 +0200

    [gdb/testsuite] Add gcc/94469 xfails to gdb.ada/call_pn.exp

    When running test-case gdb.ada/call_pn.exp with target board
    unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects, we run into:
    ...
    (gdb) print last_node_id^M
    Multiple matches for last_node_id^M
    [0] cancel^M
    [1] pck.last_node_id at gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M
    [2] pck.last_node_id at gdb/testsuite/gdb.ada/call_pn/foo.adb:17^M
    > FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
    ...

    This failure is due to a gcc bug that declares two instead of one symbols,
    filed as PR gcc/94469.

    Add an xfail at this test.  Also add a similar xfail at an earlier test,
that
    only triggers with -readnow.  Stabilize test results by making sure the
    earlier xfail is always triggered, using "maint expand-symtabs".

    Tested on x86_64-linux.

    gdb/testsuite/ChangeLog:

    2020-04-08  Tom de Vries  <tdevries@suse.de>

            PR testsuite/25760
            * gdb.ada/call_pn.exp: Call "maint expand-symtabs".  Add xfails.

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-08  4:58 ` cvs-commit at gcc dot gnu.org
@ 2020-04-08  5:04 ` vries at gcc dot gnu.org
  2020-04-08  5:07 ` vries at gcc dot gnu.org
  2020-04-08  5:19 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-08  5:04 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Testsuite patch adding xfails committed, marking resolved-fixed.

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-04-08  5:04 ` vries at gcc dot gnu.org
@ 2020-04-08  5:07 ` vries at gcc dot gnu.org
  2020-04-08  5:19 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-08  5:07 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
> (In reply to Tom de Vries from comment #0)
> > I consider this a gcc bug, I'll file one.
> > 
> 
> PR gcc/94450 - "lto abstract variable emitted as concrete decl"  (
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94450 ).

Above PR was a minimal example in C, which ended up being to minimal to
properly communicate the problem, so I refiled the PR with the actual ada
test-case at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94469 , which is also
the number I used for the xfail.

-- 
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 testsuite/25760] [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout)
  2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-04-08  5:07 ` vries at gcc dot gnu.org
@ 2020-04-08  5:19 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-08  5:19 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> Then gdb does it's fancy thing of coupling the abstract symbol with the
> minimal symbol addres (see also PR25755), and now it has two concrete
> symbols.

This turned out not to be true. The abstract symbol has LOC_OPTIMIZED_OUT, not
LOC_UNRESOLVED.

> Note: if we fix PR25759 - "Remove useless decls from symtab" these FAILs may
> disappear.
> 
> Note: we could work around these FAILs by using the "maint set
> symbol-store-decls off" proposed in PR25755.

So, given that the abstract symbol has LOC_OPTIMIZED_OUT, it looks like these
two PRs are unrelated.

-- 
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:[~2020-04-08  5:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 15:43 [Bug testsuite/25760] New: [gcc -flto] FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) vries at gcc dot gnu.org
2020-04-01 17:42 ` [Bug testsuite/25760] " vries at gcc dot gnu.org
2020-04-01 21:52 ` vries at gcc dot gnu.org
2020-04-08  4:58 ` cvs-commit at gcc dot gnu.org
2020-04-08  5:04 ` vries at gcc dot gnu.org
2020-04-08  5:07 ` vries at gcc dot gnu.org
2020-04-08  5:19 ` vries at gcc dot gnu.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).