Frank Ch. Eigler 于2023年7月29日周六 03:23写道: > > wei gong writes: > > > [...] > > I am currently experiencing challenges using SystemTap in an environment > > that includes multiple versions of glibc. I am hoping someone here may > have > > encountered a similar issue and might be able to provide guidance. > > [...] > > Currently, my environment has glibc-2.17-326.el7_9.x86_64. Because I want > > to use a newer version of GCC, I installed an additional version of GCC > and > > matched it with glibc 2.21, which I placed in the /opt/compiler/gcc-8.2/ > > directory. My software is compiled using this newly installed version of > > gcc-8.2. > > [...] > > > ./stap -d /path/myapp-DDEBUG_UNWIND -e 'probe > > process("/path/myapp").function("funtion_name").call > {print_ubacktrace()}' > > WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown; > > retry with -DDEBUG_UNWIND)' > > One possibility is that this program, being compiled with your other > gcc/glibc toolchain, is not getting identified to systemtap for purpose > of extracting unwind/symbol data. > > > WARNING: Missing unwind data for a module, rerun with 'stap -d > /usr/lib64/ > > libc-2.17.so' > > WARNING: too many pending (warning) messages > > Yeah, that's a hint. The "-d FILE" and "--ldd" options should let you > give systemtap enough hints to find the alternate toolchain shared > libraries. Try: > > # stap --ldd -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -e 'probe > ("myapp").......' > > If more missing library names come up as runtime warnings, rerun, and > add them as -d PATHs too. > > > stap --ldd -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -d /opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2 -d /opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2 -e 'probe process("myapp").function("func_name").call {print_ubacktrace()}' WARNING: module /home/opt/compiler/gcc-8.2/lib/libc-2.21.so --ldd skipped: unsupported interpreter: /opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2 WARNING: module myapp --ldd skipped: unsupported interpreter: /opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2 Trigger probe point function WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown; retry with -DDEBUG_UNWIND)' 0x8789b6 > - FChE > >