GDB aarch64 malfunctions w/Linaro / ARM gcc 10.3 compiler

I'm compiling and running a bare metal AArch64 bootloader using 2 different compilers: a GCC 10.2.0 compiler built in-house, and a Linaro / ARM GCC 10.3(.1?) compiler.

GDB will single step using the in-house built GCC 10.2; but runs without halting when step is requested - or perhaps steps multiple instructions - when built using the Linaro / ARM-supplied GCC 10.3.

Eclipse CDT (v4.20 aka 2021-06) is able to correlate debugging information from the in-house 10.2-built binary and to single step correctly through the program. Breakpoints work as expected. Registers display fine.

Eclipse CDT is not able to correlate current PC location to source code using the Linaro / ARM 10.3-built binary, instead bringing up a disassembly window. Breakpoints placed at assembly instructions in the editor do not work.

I've tried two different GDB versions - ARM's supplied GDB, and the in-house built GDB. Results are the same.

The same makefile is used - with a simple tool path change to switch. The only compiler flag of interest is -march=armv8.2-a (and of course -g -O0). -mtune=cortex-a53 doesn't help.

The board is connected via JTAG using OpenOCD 0.11.0+ and an Olimex ARM-USB-OCD-H adapter.

I'm building in a cygwin shell on Windows 10 version 21H1 using the compiler:

gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf.tar.xz

downloaded from:

developer.arm.com/.../downloads

Differences in compiler configuration (gcc -v) are:

Failing - Linaro / ARM GCC 10.3(.1):

--enable-checking=release
--target=aarch64-none-elf
--with-libiconv-prefix=/data/jenkins/workspace/GNU-toolchain/arm-10-4/build-mingw-aarch64-none-elf/host-tools

Working - in house GCC 10.2.1:

--build=x86_64-w64-mingw32
--disable-libffi
--disable-libgomp
--disable-libmudflap
--disable-libssp
--disable-libstdcxx-pch
--disable-lto
--disable-win32-registry
--enable-multilib
--target=aarch64-elf
--with-gcc
--with-gnu-as
--with-gnu-ld
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-multilib-list=lp64,ilp32
--with-stabs
--with-sysroot=/build/aarch64-elf_10.2.0/cross-gcc/aarch64-elf
--with-zstd=/build/aarch64-elf_10.2.0/host

Has anyone been able to perform debugging of binaries built with the latest 10.3 builds using GDB (and maybe even Eclipse CDT)?

Any suggestions as to other steps to try?

Thanks.

Parents Reply Children
No data