This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: userspace probe breakage with gcc 4.8 due to inablility to locate semaphore variable

>> [...]
>> I had a userspace probe (details below) and this worked fine with stap
>> 1.6 and gcc 4.6.  After upgrading to gcc 4.8, this has stopped
>> working. (I believe this to be the only change, everything else on the
>> box is the same) [...] But, stap -g -vvvvv with the following probe
>> fails with failure to find foo_bar_semaphore

> If you use relatively recent <sys/sdt.h> with semaphores (i.e., your C program #defines _SDT_HAS_SEMAPHORES), you also need to run "/usr/bin/dtrace -G ..." to create an object file
> that contains that semaphore.  That .o needs to be linked into your executable.

> -FChe

Thanks for the reply. I will keep it in mind when we update to 2.7.

Meanwhile, in my setup, I have found out that the runtime box has native gcc 4.4 And the regression is because the build uses gcc 4.8 (which uses dwarf4 by default ) while till gcc 4.6, dwarf2 was the default.  So the combination of [ build with 4.6, run on box with 4.4 ] used to work but does not work if built with 4.8. If I explicitly build the binary with -g -gdwarf-2 , then things are fine.

Unfortunately, I cannot muck with the build settings. Might there be  a way of telling systemtap at runtime that the binary being probed uses dwarf4?

This e-mail and its attachments are intended only for the individual or entity to whom it is addressed and may contain information that is confidential, privileged, inside information, or subject to other restrictions on use or disclosure. Any unauthorized use, dissemination or copying of this transmission or the information in it is prohibited and may be unlawful. If you have received this transmission in error, please notify the sender immediately by return e-mail, and permanently delete or destroy this e-mail, any attachments, and all copies (digital or paper). Unless expressly stated in this e-mail, nothing in this message should be construed as a digital or electronic signature. For additional important disclaimers and disclosures regarding KCGâs products and services, please click on the following link:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]