public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "nuno.m.paulino at inesctec dot pt" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug backtrace/28389] New: Assertion depth > 0 failed in inline_frame_sniffer
Date: Mon, 27 Sep 2021 12:40:57 +0000	[thread overview]
Message-ID: <bug-28389-4717@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2021-09-27 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 12:40 nuno.m.paulino at inesctec dot pt [this message]
2024-03-25 16:11 ` [Bug backtrace/28389] " sean.anderson at seco dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28389-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).