public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31311] New: [gdb/tdep, s390x] FAIL: gdb.dwarf2/dw2-bad-elf.exp: goto_main=1: break some_func
@ 2024-01-29 16:14 vries at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: vries at gcc dot gnu.org @ 2024-01-29 16:14 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31311
           Summary: [gdb/tdep, s390x] FAIL: gdb.dwarf2/dw2-bad-elf.exp:
                    goto_main=1: break some_func
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With target board unix/-m64/-fPIE/-pie I run into:
...
(gdb) break some_func^M
Breakpoint 2 at 0x2aa000000f8^M
(gdb) FAIL: gdb.dwarf2/dw2-bad-elf.exp: goto_main=1: break some_func
...

AFAICT what's happening is that the prologue skipper skips past the end of
function, and consequently there's no lineinfo match.

In s390_skip_prologue we find:
...
  if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
...
so indeed, we don't use the last argument as for other archs.

See for instance commit 22f2cf64f17 ("Fix PR30369 regression on aarch64/arm
(PR30506)") for how that was fixed for two other archs, such that for aarch64
we have:
...
  bool func_addr_found
    = find_pc_partial_function (pc, NULL, &func_addr, &func_end_addr);

  ...


  limit_pc
    = func_end_addr == 0 ? limit_pc : std::min (limit_pc, func_end_addr - 4);
...

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-29 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 16:14 [Bug gdb/31311] New: [gdb/tdep, s390x] FAIL: gdb.dwarf2/dw2-bad-elf.exp: goto_main=1: break some_func 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).