Skip to content

debuginfo: Line-tables-only mode emits much more debuginfo than Clang #64405

Closed

Description

@michaelwoerister

We probably could emit less debuginfo when compiling with -Cdebuginfo=1 than we do at the moment. Clang 8.0 emits a lot less debuginfo when compiling with -gline-tables-only, with debuginfo not containing any DW_TAG_subprogram entries; while stepping through the code with gdb still works.

However, reducing the amount of debuginfo emitted should be done with care since external tools rely on the current behavior (see e.g. #60020).

Activity

  1. added
    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
    on Sep 12, 2019
  2. nagisa commented on Feb 14, 2021

    @nagisa
    Member

    How can we possibly reduce the amount of debug info in -Cdebuginfo=1 if external tools rely on it producing more without it being a breaking change?

  3. nagisa commented on Feb 14, 2021

    @nagisa
    Member

    The only route I see is adding more flags (-Cdebuginfo=0.5?).

  4. jyn514 commented on Mar 18, 2023

    @jyn514
    Member

    How can we possibly reduce the amount of debug info in -Cdebuginfo=1 if external tools rely on it producing more without it being a breaking change?

    Changing the exact behavior of a codegen flag seems like a very liberal definition of "breaking" ... what if we added a new -C debuginfo=mixed flag that does what debuginfo=1 does today? and then reduced the amount we emit for =1? Firefox would have to change the flags they compile with, but that seems okay.

  5. added a commit that references this issue on Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions