public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/28389] New: Assertion depth > 0 failed in inline_frame_sniffer
@ 2021-09-27 12:40 nuno.m.paulino at inesctec dot pt
  2024-03-25 16:11 ` [Bug backtrace/28389] " sean.anderson at seco dot com
  0 siblings, 1 reply; 2+ messages in thread
From: nuno.m.paulino at inesctec dot pt @ 2021-09-27 12:40 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28389
           Summary: Assertion depth > 0 failed in inline_frame_sniffer
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: nuno.m.paulino at inesctec dot pt
  Target Milestone: ---

Created attachment 13680
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13680&action=edit
ELF File and setup required to compile (if necessary)

Assertion in inline_frame_sniffer (line 245) fails when encountering any
inlined function for target microblaze-xilinx-elf.

I am using a GDB + QEMU setup to execute my target ELF files. 
GDB version: GNU gdb (GDB) 10.0.50.20200730-git
(built from either Xilinx's fork, the mirror at bminor -
https://github.com/bminor/binutils-gdb/releases - or even the latest commit in
sourceware, i.e., a few hours ago at the time of this bug report, 27 sep 2021)

QEMU: QEMU emulator version 5.1.0 (v2.6.0-35778-ge40b634b24-dirty)
(note that this is the Xilinx branch of QEMU, since a specific target machine
`microblaze-fdt-plnx' is required; DTB included in attachment; repo for this
fork is at https://github.com/Xilinx/qemu)

Attached are the source, makefile, and compiled ELF.

Steps to reproduce:

1. Launch QEMU with `qemu-system-microblazeel -nographic -M microblaze-fdt-plnx
-m 128 -display none -kernel dotprod.elf -dtb system.dtb -gdb tcp::1234 -S`
2. Launch mb-gdb
2.1 file dotprod.elf
2.2 target remote localhost:1234
2.3 break frame_dummy
   (this is only the first case in which the issue occurs, and its in
initialization code common to all ELFs)
2.4 c
2.5 (when break hits, then stepi), until this assertion:

Breakpoint 1, 0x000001f0 in frame_dummy ()
(gdb) stepi
0x000001f4 in frame_dummy ()
(gdb) 
0x00000214 in frame_dummy ()
(gdb) 
0x00000218 in frame_dummy ()
(gdb) 
inline-frame.c:244: internal-error: int inline_frame_sniffer(const
frame_unwind*, frame_info*, void**): Assertion `depth > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

Continuing is impossible.

Note that I can set a breakpoint at "main" (or any other user function) and
continue to that point. By then issuing "stepi", this assertion fails on any
function that the compiler has inlined, OR any function declared as static (due
to implicing inlining I presume). I've verified that by removing all "static"
qualifiers, and using the " -fno-inline-functions -fno-inline-small-functions"
flags, I can step through all user code normally. However, once the _exit
routines are reached, the assertion fails again, since this library/init code
has been compiled with inlined functions (assumption?).

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

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

end of thread, other threads:[~2024-03-25 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 12:40 [Bug backtrace/28389] New: Assertion depth > 0 failed in inline_frame_sniffer nuno.m.paulino at inesctec dot pt
2024-03-25 16:11 ` [Bug backtrace/28389] " sean.anderson at seco 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).