[GHC] #10601: GHC should be distributed with debug symbols

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Now that we have the capability of producing code with DWARF symbols, we should distribute GHC with them, or at least give the option. The DWARF symbols in these case would be both for the C RTS and for the base Haskell libraries shipped with GHC. Building GHC with said symbols amounts to adding {{{ GhcRtsHcOpts += -g GhcLibHcOpts += -g }}} to `mk/build.mk`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Build System -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Tarrasch): This will incerease the binary size by about 50% I think. Here's an old comparison [1]. Just note that "debug_ghc" in that diagram doesn't exist in GHC HEAD, so just ignore that one. [1]: https://github.com/scpmw/ghc/commit/bbf6f35d8c341c8aadca1a48657084c007837b21... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by scpmw): Also note that `.debug_info` got significantly smaller, because it doesn't contain block information like before. This reduces the amount of overhead to about 18% total, according to my experiments back then: https://mail.haskell.org/pipermail/ghc-devs/2015-January/007872.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): This requires a little more work than just adding `GhcRtsHcOpts += -g` and `GhcLibHcOpts += -g` to `mk/config.mk.in`. What is also needed is to no strip debug symbols from the libraries when running 'make install', but to only do that when running 'make install- strip'. Currently, ghc-cabal tells Cabal to strip the libraries on installation (with `--strip-unneeded`), unless `STRIP_CMD = :`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9894 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * related: => #9894 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9894 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): Adding `-g` to `GhcRtsHcOpts` shouldn't be necessary, as the debug version of the RTS is already compiled with `-g`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10601: GHC should be distributed with debug symbols -------------------------------------+------------------------------------- Reporter: bitonic | Owner: (none) Type: task | Status: closed Priority: normal | Milestone: 8.2.1 Component: Build System | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9894 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 Comment: The GHC 8.2.1 includes a binary distribution which enables DWARF debugging support and includes the necessary debug information. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10601#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC