[Bug testsuite/34463] [gdb/testsuite, ppc64le-linux] FAIL: gdb.gdb/python-helper.exp: run until breakpoint at main

"cvs-commit at gcc dot gnu.org via Gdb-prs" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34463

--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The gdb-18-branch branch has been updated by Tom de Vries
<[email protected]>:

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

commit 8278822eddd18cc7026f105d14aaddde8c6e7303
Author: Tom de Vries <[email protected]>
Date:   Fri Aug 14 14:36:21 2026 +0200

    [gdb/testsuite] Fix _selftest_setup on ppc64le-linux

    On ppc64le-linux, with gcc 7.5.0 and an O0 gdb build and test-case
    gdb.gdb/python-helper.exp, I get:
    ...
    (gdb) run ...
      ...
    Breakpoint 1, main (argc=12, argv=0x7fffffffea78) at .../gdb.c:30^M
    30        gdb_assert (is_main_thread ());^M
    (gdb) PASS: $exp: run until breakpoint at main
    ...

    But with an O2 gdb build, I run into:
    ...
    (gdb) run ...
      ...
    Breakpoint 1, 0x000000001003b438 in main (argc=12, argv=0x7fffffffea78) at
\
      .../gdb.c:25
    25      {
    (gdb) FAIL: $exp: run until breakpoint at main
    ...

    The breakpoint is indeed set at address 0x1003b438:
    ...
    (gdb) break main^M
    Breakpoint 1 at 0x1003b438: file /space/vries/gdb/src/gdb/gdb.c, line 25.^M
    ...
    which is the local entry point:
    ...
    (gdb) disassemble main
    Dump of assembler code for function main(int, char**):
       0x000000001003b430 <+0>:     lis     r2,4606
       0x000000001003b434 <+4>:     addi    r2,r2,28416
       0x000000001003b438 <+8>:     mflr    r0
    ...

    And indeed, at that address, there's no "recommended breakpoint location":
    ...
    gdb.c:
    File name                Line number    Starting address    View    Stmt
    gdb.c                             25          0x1003b430               x
    gdb.c                             30          0x1003b454               x
    gdb.c                             37          0x1003b464               x
    ...

    So gdb behaves as expected.

    Fix this by updating the pass regexp to allow this type of gdb output.

    This fixes both test-case gdb.gdb/python-helper.exp and
gdb.gdb/selftest.exp.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34463
    (cherry picked from commit 9d7cee1b8972dd9c77dc556cc193375db9f2570c)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.