public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29124] New: Regressions in overlays.exp
@ 2022-05-06 13:05 craig.blackmore at embecosm dot com
  2022-05-06 13:15 ` [Bug gdb/29124] Regressions in gdb.base/overlays.exp craig.blackmore at embecosm dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: craig.blackmore at embecosm dot com @ 2022-05-06 13:05 UTC (permalink / raw)
  To: gdb-prs

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.

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

end of thread, other threads:[~2022-05-10  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 13:05 [Bug gdb/29124] New: Regressions in overlays.exp craig.blackmore at embecosm dot com
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

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