public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td
@ 2020-10-28  9:37 vries at gcc dot gnu.org
  2020-10-28  9:38 ` [Bug rust/26799] " vries at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-10-28  9:37 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 26799
           Summary: [readnow] FAIL: gdb.rust/traits.exp: print *td
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: rust
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With target board -readnow, we run into:
...
(gdb) print *td^M
Attempt to take contents of a non-pointer value.^M
(gdb) FAIL: gdb.rust/traits.exp: print *td
print *tu^M
Attempt to take contents of a non-pointer value.^M
(gdb) FAIL: gdb.rust/traits.exp: print *tu
...

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
@ 2020-10-28  9:38 ` vries at gcc dot gnu.org
  2020-10-28  9:38 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-10-28  9:38 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 12923
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12923&action=edit
gzipped exec

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
  2020-10-28  9:38 ` [Bug rust/26799] " vries at gcc dot gnu.org
@ 2020-10-28  9:38 ` vries at gcc dot gnu.org
  2020-10-31 20:16 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-10-28  9:38 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
  2020-10-28  9:38 ` [Bug rust/26799] " vries at gcc dot gnu.org
  2020-10-28  9:38 ` vries at gcc dot gnu.org
@ 2020-10-31 20:16 ` tromey at sourceware dot org
  2020-11-01  0:40 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-10-31 20:16 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
find_symbol_at_address does not allow the possibility
of an objfile that has symtabs but no psymtabs.
So, it doesn't work correctly with -readnow.

I think this is a bug in that function.

One idea might be that in this case:

      if (objfile->sf == NULL
          || objfile->sf->qf->find_compunit_symtab_by_address == NULL)
        continue;

... to instead search all the symtabs of the objfile.

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-31 20:16 ` tromey at sourceware dot org
@ 2020-11-01  0:40 ` tromey at sourceware dot org
  2020-11-01  0:44 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-11-01  0:40 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch.

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-01  0:40 ` tromey at sourceware dot org
@ 2020-11-01  0:44 ` tromey at sourceware dot org
  2020-11-12 15:56 ` cvs-commit at gcc dot gnu.org
  2020-11-12 15:58 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-11-01  0:44 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Note this is known not to work with gdb_index.

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-11-01  0:44 ` tromey at sourceware dot org
@ 2020-11-12 15:56 ` cvs-commit at gcc dot gnu.org
  2020-11-12 15:58 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-12 15:56 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

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

commit 1f2624a35413c31c317e5da8ce7401b59ecfbfa5
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Nov 12 08:47:09 2020 -0700

    Fix Rust regression with -readnow

    PR rust/26799 points out that a certain test case fails with -readnow.
    This happens because, with -readnow, there are no partial symtabs; but
    find_symbol_at_address requires these.

    This patch fixes this problem by searching all of an objfile's
    compunit symtabs if it does not have partial symbols.

    Note that this test will still fail with .gdb_index.  I don't think
    that is readily fixable.

    gdb/ChangeLog
    2020-11-12  Tom Tromey  <tom@tromey.com>

            PR rust/26799:
            * symtab.c (find_symbol_at_address): Search symtabs if no psymtabs
            exist.

    gdb/testsuite/ChangeLog
    2020-11-12  Tom Tromey  <tom@tromey.com>

            PR rust/26799:
            * gdb.rust/traits.exp: Remove kfails.

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

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

* [Bug rust/26799] [readnow] FAIL: gdb.rust/traits.exp: print *td
  2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-11-12 15:56 ` cvs-commit at gcc dot gnu.org
@ 2020-11-12 15:58 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-11-12 15:58 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

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

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

end of thread, other threads:[~2020-11-12 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  9:37 [Bug rust/26799] New: [readnow] FAIL: gdb.rust/traits.exp: print *td vries at gcc dot gnu.org
2020-10-28  9:38 ` [Bug rust/26799] " vries at gcc dot gnu.org
2020-10-28  9:38 ` vries at gcc dot gnu.org
2020-10-31 20:16 ` tromey at sourceware dot org
2020-11-01  0:40 ` tromey at sourceware dot org
2020-11-01  0:44 ` tromey at sourceware dot org
2020-11-12 15:56 ` cvs-commit at gcc dot gnu.org
2020-11-12 15:58 ` tromey at sourceware 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).