After this commit: commit f43a495397a431683f2b5ee8ad827f77b82f5f09 Author: Stan Cox <scox@redhat.com> Date: Tue Mar 9 10:50:14 2010 -0500 Only use volatile for sdt.h arguments when needed. sdt.h (VOLATILE_ARG): gcc 4.4.3 support for inline asm argument debug info means volatile is not needed. The following testcase started failing: Running /home/mark/systemtap/testsuite/systemtap.base/cxxclass.exp ... FAIL: cxxclass === systemtap Summary === # of expected passes 1 # of unexpected failures 1 Running /home/mark/systemtap/testsuite/systemtap.base/cxxclass.exp ... Executing on host: g++ /home/mark/systemtap/testsuite/systemtap.base/cxxclass.cxx -g -O2 -I/home/mark/systemtap/testsuite/../includes -lm -o cxxclass.exe (timeout = 300) PASS: cxxclass.c compile executing: stap /home/mark/systemtap/testsuite/systemtap.base/cxxclass.stp cxxclass.exe -c ./cxxclass.exe FAIL: cxxclass line 1: expected "main_enter" Got "semantic error: failed to retrieve location attribute for local 'arg3' (dieoffset: 0x599): identifier '$arg3' at /home/mark/systemtap/testsuite/systemtap.base/cxxclass.stp:28:57" This is on fedora 12 x86_64 with g++ (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4)
This commit makes things work again: commit 985adad37f66be2b1796641360296b7632c7f290 Author: Stan Cox <scox@redhat.com> Date: Tue Mar 9 17:40:04 2010 -0500 Include __GNUC_RH_RELEASE__ in the volatile check. sdt.h (GNUC_VERSION) Include __GNUC_RH_RELEASE__. Check for at least gcc 4.4.4 Do you happen to know which 4.4.4 commit made it work, that isn't in 4.4.3? (I even tried the fedora 12 4.4.3-8 version, which still fails if the above check is "downgraded").
Also tried with g++ (GCC) 4.4.3 20100309 (Red Hat 4.4.3-9) which also still fails. We really should try to figure out what 4.4.4 patch does make this work.
BTW. The test/guard is: #if GNUC_VERSION >= 4040400 && ! defined VOLATILE What about a program that might be using VOLATILE as define already? Can't we use something a bit less likely to be used?
See also: https://bugzilla.redhat.com/show_bug.cgi?id=572260 "missing debuginfo for inline asm arg in c++ method"
Upstream gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43329 "Early inlining causes suboptimal debug info"
commit 6ccb243c59eff3ac89072b112414c50d6ef6cf3b Author: Mark Wielaard <mjw@redhat.com> Date: Wed Mar 17 15:41:02 2010 +0100 PR11364 sdt.h volatile for args isn't needed with gcc 4.5 or rh 4.4.3-10+