From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 646B33858002; Thu, 18 Mar 2021 15:57:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 646B33858002 From: "filip.bascarevic at siemens dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/99649] New: GDB has issue to show backtrace if the breakpoint is in a function with more then 8 parameters only in target aarch64-elf ILP32 Date: Thu, 18 Mar 2021 15:57:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: filip.bascarevic at siemens dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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 cf_gcchost cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2021 15:57:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99649 Bug ID: 99649 Summary: GDB has issue to show backtrace if the breakpoint is in a function with more then 8 parameters only in target aarch64-elf ILP32 Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: filip.bascarevic at siemens dot com Target Milestone: --- Host: x86_64-w64-mingw32 Target: aarch64-elf ilp32 Created attachment 50422 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50422&action=3Dedit This is a small example that demonstrates the bug. Content is just start.c start.S and start.lk and also scripts which will help you build the example. This example doesn't contain any include. Dear GCC team, the Siemens developers noticed one issue in a GCC 10.2 and we don't know ho= w to deal with it. It occurs only for an aarch64 ilp32 target. Generally when we= put a breakpoint into function with more the 8 arguments then GDB has a problem showing backtrace. To be exact, the last function is shown in an endless lo= op unless GDB is forced to quit or the backtrace limit is set.=20=20 I=E2=80=99ve created a small example to reproduce this problem with Qemu (4= .1) and GCC 10.2 toolchain. Inside the package, there is a =E2=80=98readme.txt=E2=80=99= file with instructions on how to build, start Qemu and GDB (with GDB commands) to demonstrate the problem. The interesting fact is that if you use LP64 ABI t= han this problem does not occur. Because it is working on LP64, I don't think t= he issue is in the GDB. NOTES: 1. This example is compiled on Windows 10 using aarch64_elf compiler for Windows. It contains only one simple .c and one .S file. To successfully compile it please change a PATH of the toolchain and QEMU directory at the beginning of the script build_and_run_qemu.cmd. 2. Also update a path of the GDB at the beginning of the run_gdb.cmd script. 3. As I mentioned above, we compiled that example with aarch64_elf compiler= on Windows 10. Because this ILP32 target is really specific, we built our toolchain with MinGW using this command:=20 $SRCDIR/configure --host=3Dx86_64-w64-mingw32 --build=3Dx86_64-w64-mingw32= =20 --prefix=3D$prefix --target=3Daarch64-elf --disable-nls --enable-multilib --with-multilib-list=3Dlp64,ilp32 --enable-languages=3Dc,c++ --disable-decimal-float --with-sysroot=3D$prefix --without-headers --disable-shared --disable-threads --disable-lto --disable-libmudflap --disable-libssp --disable-libgomp --disable-libffi --disable-libstdcxx-pch --disable-win32-registry '--with-host-libstdcxx=3D-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-newlib --with-gcc --with-gnu-as --with-gnu-ld --with-gmp=3D$prefixlocal --with-mpfr=3D$prefixlocal --with-mpc=3D$prefixlocal --with-isl=3D$prefixlocal --with-zstd=3D$prefixlo= cal || return $ECONFIGURE Please let me know if I can assist any further. I am so sorry because I did= n't upload the preprocessed file (*.i*) because this is not a common bug and fo= r my understanding test example is more useful in this case. With best regards, MSc. Filip Bascarevic Siemens, s.r.o. ADV D EU CZ AE AC 4 Anglicke nabrezi 2434/1 301 00 Plzen, Czech Republic=20 filip.bascarevic@siemens.com=