public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
@ 2024-01-24 22:52 vries at gcc dot gnu.org
  2024-01-25  9:17 ` [Bug testsuite/31291] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-24 22:52 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31291
           Summary: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit
                    breakpoint (the program exited)
           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: ---

On aarch64 fedora rawhide, I run into:
...
(gdb) PASS: gdb.base/eh_return.exp: set breakpoint on address
run ^M
Starting program:
/data/vries/gdb/build/gdb/testsuite/outputs/gdb.base/eh_return/eh_return ^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
[Inferior 1 (process 140133) exited normally]^M
(gdb) FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
...

AFAICT, what happens is that we set a breakpoint:
...
(gdb) break *0x00000000004103ec^M
...
on the last in of function eh2:
...
   0x00000000004103e0 <+176>:   cbz     x4, 0x4103ec <eh2+188>^M
   0x00000000004103e4 <+180>:   add     sp, sp, x5^M
   0x00000000004103e8 <+184>:   br      x6^M
   0x00000000004103ec <+188>:   ret^M
...
and we don't make it there because instead the "br x6" is taken.

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

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

* [Bug testsuite/31291] [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
  2024-01-24 22:52 [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited) vries at gcc dot gnu.org
@ 2024-01-25  9:17 ` vries at gcc dot gnu.org
  2024-01-25 14:17 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-25  9:17 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
In contrast, with f39 we have:
...
   0x00000000004103bc <+156>:   ldp     x2, x3, [sp, #48]^M
   0x00000000004103c0 <+160>:   ldp     x29, x30, [sp, #16]^M
   0x00000000004103c4 <+164>:   add     sp, sp, #0x50^M
   0x00000000004103c8 <+168>:   add     sp, sp, x4^M
   0x00000000004103cc <+172>:   ret^M
...
and the breakpoint is reached.

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

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

* [Bug testsuite/31291] [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
  2024-01-24 22:52 [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited) vries at gcc dot gnu.org
  2024-01-25  9:17 ` [Bug testsuite/31291] " vries at gcc dot gnu.org
@ 2024-01-25 14:17 ` vries at gcc dot gnu.org
  2024-01-25 15:23 ` cvs-commit at gcc dot gnu.org
  2024-01-25 15:24 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-25 14:17 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2024-January/206212.html

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

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

* [Bug testsuite/31291] [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
  2024-01-24 22:52 [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited) vries at gcc dot gnu.org
  2024-01-25  9:17 ` [Bug testsuite/31291] " vries at gcc dot gnu.org
  2024-01-25 14:17 ` vries at gcc dot gnu.org
@ 2024-01-25 15:23 ` cvs-commit at gcc dot gnu.org
  2024-01-25 15:24 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-25 15:23 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Sourceware Commits <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=7ff4111cdee7eedbe083918f34774e1487ece557

commit 7ff4111cdee7eedbe083918f34774e1487ece557
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Jan 25 16:25:07 2024 +0100

    [gdb/testsuite] Fix gdb.base/eh_return.exp

    On Fedora rawhide aarch64, I run into:
    ...
    (gdb) PASS: gdb.base/eh_return.exp: set breakpoint on address
    run ^M
    Starting program: eh_return ^M
    [Thread debugging using libthread_db enabled]^M
    Using host libthread_db library "/lib64/libthread_db.so.1".^M
    [Inferior 1 (process 1113051) exited normally]^M
    (gdb) FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
    ...

    This happens as follows: the test-case sets a breakpoint on the last
    instruction of function eh2:
    ...
    (gdb) break *0x00000000004103ec^M
    ...
    and expects to hit the breakpoint, but instead the "br x6" is taken:
    ...
       0x00000000004103e0 <+176>:   cbz     x4, 0x4103ec <eh2+188>^M
       0x00000000004103e4 <+180>:   add     sp, sp, x5^M
       0x00000000004103e8 <+184>:   br      x6^M
       0x00000000004103ec <+188>:   ret^M
    ...

    In contrast, with fedora f39 we have:
    ...
       0x00000000004103bc <+156>:   ldp     x2, x3, [sp, #48]^M
       0x00000000004103c0 <+160>:   ldp     x29, x30, [sp, #16]^M
       0x00000000004103c4 <+164>:   add     sp, sp, #0x50^M
       0x00000000004103c8 <+168>:   add     sp, sp, x4^M
       0x00000000004103cc <+172>:   ret^M

    ...
    and the breakpoint is reached.

    Fix this by detecting that the breakpoint is not hit, and declaring the
test
    unsupported.

    Tested on aarch64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR testsuite/31291
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31291

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

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

* [Bug testsuite/31291] [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited)
  2024-01-24 22:52 [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-25 15:23 ` cvs-commit at gcc dot gnu.org
@ 2024-01-25 15:24 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-25 15:24 UTC (permalink / raw)
  To: gdb-prs

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

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

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.

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

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

end of thread, other threads:[~2024-01-25 15:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 22:52 [Bug testsuite/31291] New: [gdb/testsuite] FAIL: gdb.base/eh_return.exp: hit breakpoint (the program exited) vries at gcc dot gnu.org
2024-01-25  9:17 ` [Bug testsuite/31291] " vries at gcc dot gnu.org
2024-01-25 14:17 ` vries at gcc dot gnu.org
2024-01-25 15:23 ` cvs-commit at gcc dot gnu.org
2024-01-25 15:24 ` 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).