public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "craig.blackmore at embecosm dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29124] New: Regressions in overlays.exp
Date: Fri, 06 May 2022 13:05:16 +0000	[thread overview]
Message-ID: <bug-29124-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29124
           Summary: Regressions in overlays.exp
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: craig.blackmore at embecosm dot com
  Target Milestone: ---

overlays.exp is only tested on m32r. Until recently I was getting 81 passes
testing on the builtin m32r sim, however, there are 14 unexpected failures with
latest master commit 0ee8858e7aeca5ba5f702204daad2ddd290ef229.

Using git bisect, I found that the regressions appeared when the new DWARF
indexer was enabled in commit 3d20b8d99a54382e6e1a6c433e71e0775c6856c6. Looking
at the regressions, there seems to be an issue with symbol lookup, but I have
not tracked down the root cause. Below is a summary of the failures.

The first few regressions are for `print <symbol>` commands that end up
printing the wrong symbol:

print foo
$1 = {int (int)} 0x400000 <*foo*>
(gdb) PASS: gdb.base/overlays.exp: get foo  load address
print bar
$2 = {int (int)} 0x400024 <*foo*>
(gdb) FAIL: gdb.base/overlays.exp: get bar  load address
print baz
$3 = {int (int)} 0x400048 <*baz*>
(gdb) PASS: gdb.base/overlays.exp: get baz  load address
print grbx
$4 = {int (int)} 0x40006c <*baz*>
(gdb) FAIL: gdb.base/overlays.exp: get grbx load address
...
print bar
$10 = {int (int)} 0x300000 <foo>
(gdb) FAIL: gdb.base/overlays.exp: get bar  runtime address
...
print grbx
$12 = {int (int)} 0x380000 <baz>
(gdb) FAIL: gdb.base/overlays.exp: get grbx runtime address

Next, the test fails to find addresses for the same symbols as above (which is
done using print <symbol>):

print 0x400000   != 0x300000
$17 = 1
(gdb) PASS: gdb.base/overlays.exp: foo's LMA   != VMA
print 0   != 0
$18 = 0
(gdb) FAIL: gdb.base/overlays.exp: bar's LMA   != VMA
print 0x400048   != 0x380000
$19 = 1
(gdb) PASS: gdb.base/overlays.exp: baz's LMA   != VMA
print 0  != 0
$20 = 0
(gdb) FAIL: gdb.base/overlays.exp: grbx's LMA  != VMA

Then, for the same symbols, GDB sets breakpoints on the wrong symbol:

break foo
Breakpoint 2 at 0x300008: file binutils-gdb/gdb/testsuite/gdb.base/foo.c, line
5.
(gdb) PASS: gdb.base/overlays.exp: break foo
break bar
Note: breakpoint 2 also set at pc 0x300008.
Breakpoint 3 at 0x300008: file binutils-gdb/gdb/testsuite/gdb.base/foo.c, line
5.
(gdb) FAIL: gdb.base/overlays.exp: break bar
break baz
Breakpoint 4 at 0x380008: file binutils-gdb/gdb/testsuite/gdb.base/baz.c, line
5.
(gdb) PASS: gdb.base/overlays.exp: break baz
break grbx
Note: breakpoint 4 also set at pc 0x380008.
Breakpoint 5 at 0x380008: file binutils-gdb/gdb/testsuite/gdb.base/baz.c, line
5.
(gdb) FAIL: gdb.base/overlays.exp: break grbx

The remaining 6 failures are due to failing to hit the above breakpoints in the
expected place and produce the expected backtrace.

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

             reply	other threads:[~2022-05-06 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 13:05 craig.blackmore at embecosm dot com [this message]
2022-05-06 13:15 ` [Bug gdb/29124] Regressions in gdb.base/overlays.exp craig.blackmore at embecosm dot com
2022-05-07 15:03 ` tromey at sourceware dot org
2022-05-10  9:19 ` craig.blackmore at embecosm dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29124-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).