cmake: Fix debugging info #34116

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:251219-debug-path changing 5 files +11 −14
  1. hebasto commented at 3:57 pm on December 19, 2025: member

    #30811 was intended to address #30799. However, it introduced several unforeseen consequences, including #31957 and #31204.

    This PR takes an alternative approach to resolving #30799 and reverts #30811.

  2. hebasto added the label Build system on Dec 19, 2025
  3. DrahtBot commented at 3:57 pm on December 19, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34116.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK arejula27

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    No conflicts as of last run.

  4. hebasto commented at 3:58 pm on December 19, 2025: member

    @maflcko

    Could you please confirm that this PR fixes #31957 when the build system is being configured using -DWITH_CCACHE=OFF?

  5. hebasto marked this as a draft on Dec 19, 2025
  6. Ensure stable source location logging regardless of `-ffile-prefix-map` 0fe849b0c3
  7. Revert "build: Avoid using the `-ffile-prefix-map` compiler option"
    This reverts commit 01a7298818d7bd66bb8c800d7cd30ae0a4d3b1d1.
    2d7a514b84
  8. Revert "build: Unify `-logsourcelocations` format"
    This reverts commit 788c1324f3d840f7a39b8bc3537dcff26ca0b552.
    4d79472fe6
  9. hebasto force-pushed on Dec 19, 2025
  10. hebasto marked this as ready for review on Dec 19, 2025
  11. DrahtBot added the label CI failed on Dec 19, 2025
  12. fanquake renamed this:
    cmake: Fix debugginng info
    cmake: Fix debugging info
    on Dec 19, 2025
  13. DrahtBot removed the label CI failed on Dec 19, 2025
  14. arejula27 commented at 1:00 pm on December 24, 2025: none

    concept ACK [4d79472fe6956caa901f3c8fc872f34c8dc9d682] This PR attempts to solve issue #31204 as PR #34081; however, this PR also solves #30799. I would prefer this one for the following reasons:

    • This one feels cleaner; instead of overwriting remaps, it just deletes deprecated code, removing unnecessary remaps and applying only when it is required (WITH_CCACHE=ON).
    • Address two issues at once that have been related since the beginning, finally closing both.
    • The #34081 PR currently only works for bitcoind binary, while this one also works for other binaries such as test_bitcoin. This has been verified:
     0$ gdb  build/bin/test_bitcoin                                                                                                      13:56
     1
     2(gdb) b addrman_tests.cpp:32
     3Breakpoint 1 at 0xe08ae: file ./src/test/addrman_tests.cpp, line 32.
     4(gdb) run
     5Starting program: /home/arejula27/workspaces/bitcoin/build/bin/test_bitcoin
     6
     7Running 688 test cases...
     8
     9Breakpoint 1, GetCheckRatio (node_ctx=...) at ./src/test/addrman_tests.cpp:32
    1032          return std::clamp<int32_t>(node_ctx.args->GetIntArg("-checkaddrman", 100), 0, 1000000);
    11Missing rpms, try: dnf --enablerepo='*debug*' install libevent-debuginfo-2.1.12-15.fc42.x86_64 sqlite-libs-debuginfo-3.47.2-5.fc42.x86_64 capnproto-libs-debuginfo-1.0.1-5.fc42.x86_64 libstdc++-debuginfo-15.2.1-4.fc42.x86_64 glibc-debuginfo-2.41-11.fc42.x86_64 libgcc-debuginfo-15.2.1-4.fc42.x86_64 zlib-ng-compat-debuginfo-2.2.5-2.fc42.x86_64
    

    I have also inspected the debug symbols and these changes keeps relative paths as it is recommended on the conversation had on the issues mentioned before:

    0$ objdump -g ./build/bin/bitcoind | grep -A5 -B5 "src/" 
    1
    2    <29531d3>   DW_AT_name        : (indirect line string, offset: 0x5cdc): ./src/wallet/init.cpp
    3    <29531d7>   DW_AT_comp_dir    : (indirect line string, offset: 0x13): ./build/src
    

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-07 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me