Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 674
    • Issues 674
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3544
Closed
Open
Created Sep 04, 2021 by Victor Michel@vikmik

Missing debug symbols in release archives

Hello!

I was looking into PyPy's debugging information, and it seems that PyPy release tarballs for Linux ( like https://downloads.python.org/pypy/pypy3.7-v7.3.5-linux64.tar.bz2 ) do not contain DWARF debug information, even though "debug" files are provided. The provided debug files only contain the .symtab section, which does not allow for debugging / single-stepping / and do not contain function & line information.

Notice the "No debugging symbols found in ./bin/libpypy3-c.so.debug" output in the GDB invocation below:

vic@lapdog: /tmp/tmp.jUIt3BCVdR/pypy3.7-v7.3.5-linux64$ gdb ./bin/libpypy3-c.so.debug
GNU gdb (Debian 10.1-2) 10.1.90.20210103-git
[...]
Reading symbols from ./bin/libpypy3-c.so.debug...
(No debugging symbols found in ./bin/libpypy3-c.so.debug)

Would it be possible to add the -g flag to the build? It seems that the rest of the release tooling already does the right thing: see https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/pypy/tool/release/smartstrip.py#L18 - by invoking strip & objcopy --only-keep-debug. The resulting (stripped) executable should be the same, but the debug file would also contain additional sections like .debug_info, which allows tools like GDB and symbolizers to work nicely.

I am entirely new to PyPy so I'm not quite sure how best to approach that. As far as I understand (not much yet :) ) it looks like there are 2 options for this:

  • Append -g to the CFLAGS environment variable in the release build environment (not sure how it looks like / where it is defined)
  • Add -g to the compiler parameters explicitly (here: https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/rpython/translator/platform/linux.py#L16 unless I'm completely mistaken)

What would be recommended here?

Thanks!

Edited Sep 04, 2021 by Victor Michel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking