From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BF4A3858408; Mon, 27 Sep 2021 12:40:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BF4A3858408 From: "nuno.m.paulino at inesctec dot pt" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: backtrace X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nuno.m.paulino at inesctec dot pt X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2021 12:40:58 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28389 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=3D13680&action=3Ded= it 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.=20 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 20= 21) 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 machi= ne `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)=20 0x00000214 in frame_dummy () (gdb)=20 0x00000218 in frame_dummy () (gdb)=20 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 "stati= c" qualifiers, and using the " -fno-inline-functions -fno-inline-small-functio= ns" flags, I can step through all user code normally. However, once the _exit routines are reached, the assertion fails again, since this library/init co= de has been compiled with inlined functions (assumption?). --=20 You are receiving this mail because: You are on the CC list for the bug.=