Community
Participate
Working Groups
Debug a process with shared library, when try to step into a shared library function, the next source line should be into the shared library function, but on qemuppc, it stepped first in some assemble language, after several step into, then it stepped into the shared library function. But on qemuarm64, it stepped directly into the function. I use the kirkstone branch of poky of yocto for qemuppc.
And on our side, If we debugged it on PPC64, it stepped first into call_plt function as following: (wrdbg) n sharedLibTestLibRtn result is: 15.707951 sharedLibTestLibRtn1 called: bonjour mon ami 52 sharedLibTestLibRtn (5); (wrdbg) s 0x0000000004001140 in 00000018.plt_call.sharedLibTestLibRtn () at 00000018.plt_call.sharedLibTestLibRtn No source file available for this address. (wrdbg) bt #0 0x0000000004001140 in 00000018.plt_call.sharedLibTestLibRtn () at 00000018.plt_call.sharedLibTestLibRtn #1 0x0000000004001a8c in main () at sharedLibTest.c:52 #2 0x00000000040014b8 at _start+0xb4 (wrdbg) please note the plt_call function.
BTW: Do you know why the Yocto disables the Breakpoints, StackTrace , etc. on PPC64, RISC-V? that means we cannot debug on PPC64 through tcf-agent. in file meta/recipes-devtools/tcf-agent/tcf-agent_git.bb: LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ -DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \ -DSERVICE_StackTrace=0 -DSERVICE_Expressions=0" # These features don't compile for several cases. # CFLAGS:append:arc = " ${LCL_STOP_SERVICES}" CFLAGS:append:mips = " ${LCL_STOP_SERVICES}" CFLAGS:append:mips64 = " ${LCL_STOP_SERVICES}" CFLAGS:append:libc-musl = " ${LCL_STOP_SERVICES}" CFLAGS:append:powerpc64 = " ${LCL_STOP_SERVICES}" CFLAGS:append:powerpc64le = " ${LCL_STOP_SERVICES}" CFLAGS:append:riscv64 = " ${LCL_STOP_SERVICES}" CFLAGS:append:riscv32 = " ${LCL_STOP_SERVICES}"
Created attachment 288704 [details] reproducible case
how about this issue? it can not reproduce?
thank very much.
I cannot reproduce. What version of gcc do you use? > Do you know why the Yocto disables the Breakpoints, StackTrace... No idea, I don't know much about Yocto.
I tested this case on Ubuntu 20.04.4 LTS with Yocto kirkstone branch. 1, git clone git://git.yoctoproject.org/poky git checkout -t origin/kirkstone -b my-kirkstone 2, source oe-init-build-env build-ppc 3, added the following line to conf/local.conf file under build-ppc dir: MACHINE ?= "qemuppc" 4, bitbake core-image-full-cmdline 5, runqemu qemuppc then built the attached case in embedded Linux and debugged it. when debugging it, stepped into a shared library function, the next line is not in the shared library function. all others are default, we did not change any other thing. ------------------------------------------------------- pek-wb-u20: ~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) Release: 20.04 Codename: focal
3, added the following two lines to conf/local.conf file under build-ppc dir: MACHINE ?= "qemuppc" EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-sdk tools-debug eclipse-debug tools-testapps" 5, runqemu nographic
I have committed a fix. Thanks!