gitian: Ship debug tarballs/zips with debug symbols #8167

pull theuni wants to merge 3 commits into bitcoin:master from theuni:split-debug changing 4 files +49 −30
  1. theuni commented at 3:42 am on June 8, 2016: member

    Addresses #7770, though only Linux and Windows for now. OSX will need a little more attention, since dsymutil isn’t yet built as part of our toolchain.

    To test, simply untar/unzip the new -debug files in the same path as the binaries, and gdb should find them automatically.

    To make my life easier while I was in there, I fixed up depends to play nice with CONFIG_SITE, which can be used now instead of abusing –prefix, though the –prefix hack still works fine.

    Now, configure can also be run like:

    0CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site --prefix=/whatever/you/want
    
  2. depends: allow for CONFIG_SITE to be used rather than stealing prefix
    This does not break any existing prefix behavior, only makes new behavior work.
    
    For example:
    CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --prefix=/
    b676f38791
  3. gitian: use CONFIG_SITE rather than hijacking the prefix ad38204e6e
  4. gitian: create debug packages for linux/windows
    The -debug tarballs/zips contain detached debugging symbols. To use them, place
    in the same dir as the target binary, and invoke gdb as usual.
    
    Also, because the debug symbols add a substantial space requirement, the build
    dirs are now deleted when they're no longer needed.
    7e7eb2724e
  5. MarcoFalke added the label Build system on Jun 8, 2016
  6. laanwj commented at 10:52 am on June 8, 2016: member
    Very cool! utACK 7e7eb27
  7. jonasschnelli commented at 10:57 am on June 8, 2016: contributor
    Nice utACK 7e7eb2724e1d66b9d6675433798f312a71789a8f
  8. sipa commented at 12:28 pm on June 8, 2016: member
    Concept ACK
  9. laanwj commented at 4:42 pm on June 8, 2016: member

    Tested ACK for Linux (gitian-built executables):

    • Generating a backtrace shows names and debug info when loading the symbols in gdb, but not when not having loaded the symbols (e.g. when moving the .gdb out of the way)
    • addr2line works
    0$ addr2line -Caife bitcoind.dbg 0xb258c                                                           
    10x00000000000b258c
    2ReadBlockFromDisk(CBlock&, CBlockIndex const*, Consensus::Params const&)
    3/home/ubuntu/build/bitcoin/distsrc-x86_64-unknown-linux-gnu/src/main.cpp:1562
    

    Haven’t tested windows yet.

  10. laanwj commented at 6:08 pm on June 8, 2016: member

    Hm, only tangentially related to this pull, but this is strange, looks like windows .zip still has bench_bitcoin.exe:

    0-rwxr-xr-x 1 orion orion   2886675 Jan  1 00:00 bench_bitcoin.exe
    1-rwxrwxr-x 1 orion orion  15123409 Jan  1 00:00 bench_bitcoin.exe.dbg
    

    Seems I overlooked that one in #7776 (gitian-win.yml doesn’t have the --disable-bench). Fixed in #8175.

  11. laanwj commented at 6:15 pm on June 8, 2016: member

    Tested ACK Windows:

    0$ /usr/bin/x86_64-w64-mingw32-addr2line -Caife bitcoind.exe.dbg 504000                                   
    10x0000000000504000
    2CBlockIndex::GetMedianTimePast() const
    3/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/chain.h:291
    4UpdateTime(CBlockHeader*, Consensus::Params const&, CBlockIndex const*)
    5/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/miner.cpp:62
    

    (haven’t tried mingw-wine gdb, but I believe you that it works)

  12. theuni commented at 6:37 pm on June 8, 2016: member

    I tried it insomuch as gdb finds the symbols, but I had other local issues preventing gdb from working with wine. I’m not sure that I’ve ever actually used gdb for win debugging.

    I’m assuming most windows crash investigations will happen via add2rline, but if you’ve used gdb that way in the past and would like to verify that it works, I’ll see if I can work out my issue and test.

  13. laanwj merged this on Jun 9, 2016
  14. laanwj closed this on Jun 9, 2016

  15. laanwj referenced this in commit 19ea17302e on Jun 9, 2016
  16. laanwj commented at 5:24 am on June 9, 2016: member

    I’m assuming most windows crash investigations will happen via add2rline, but if you’ve used gdb that way in the past and would like to verify that it works, I’ll see if I can work out my issue and test.

    Yes, I’ve done so once, it was not a very pleasant experience. No need to spend more work there, that’s so rare that we can fix it up if it happens to not work then.

  17. laanwj referenced this in commit b7bf037121 on Jun 21, 2016
  18. zkbot referenced this in commit 4ee9d712b5 on Oct 17, 2016
  19. codablock referenced this in commit 8b5da94bb2 on Sep 16, 2017
  20. codablock referenced this in commit b5504c3820 on Sep 19, 2017
  21. schinzelh referenced this in commit 4735eda91a on Oct 19, 2017
  22. schinzelh referenced this in commit 72c6f984c3 on Oct 19, 2017
  23. MarcoFalke locked this on Sep 8, 2021

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: 2024-12-19 15:12 UTC

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