]> sourceware.org Git - systemtap.git/commitdiff
Generate DWARF for HelperSDT/_HelperSDT*.so
authorMartin Cermak <mcermak@redhat.com>
Thu, 25 Jul 2024 14:15:53 +0000 (16:15 +0200)
committerMartin Cermak <mcermak@redhat.com>
Thu, 25 Jul 2024 14:15:53 +0000 (16:15 +0200)
Python Extension Flags Reduction effort [1] dropped GCC -g switch
from the build and linker flags (CFLAGS and LDFLAGS) saved internally
in the Python interpreter for use by distutils and other build systems.

For systemtap this means that the expected debugging symbols weren't
generated for the Helper SDT python module, e.g.:

/usr/lib/debug/usr/lib64/python3.12/site-packages/HelperSDT/_HelperSDT.\
cpython-312-x86_64-linux-gnu.so-5.1-7.el10.x86_64.debug
in systemtap-runtime-python3-debuginfo ... is missing debugging symbols.

To generate the needed debugging symbols, the -g switch  needs to be
passed explicitly to the Helper SDT gen script via extra_compile_args.

-------
[1] https://fedoraproject.org/wiki/Changes/Python_Extension_Flags_Reduction

python/setup.py

index aea5ce9c8b1aef53dfc220fd9e33c6c7951e97c0..0942fab043a273616bfcd051c4ce1cc608db8852 100644 (file)
@@ -48,7 +48,8 @@ setup(
     author = 'Systemtap Development Team',
     author_email = 'systemtap@sourceware.org',
     ext_modules = [
-        Extension("HelperSDT._HelperSDT", ["HelperSDT/_HelperSDT.c"]),
+        Extension("HelperSDT._HelperSDT", ["HelperSDT/_HelperSDT.c"],
+        extra_compile_args=['-g'], extra_link_args=['-g']),
     ],
     packages = ['HelperSDT'],
     cmdclass={
This page took 0.031279 seconds and 5 git commands to generate.