Re: Hadrian build with DWARF information doesn't contain as much debug information as I would expect

Adam Sandberg Eriksson adam at sandbergericsson.se
Sun May 3 07:19:42 UTC 2020


I don't know how you read the DWARF info but maybe it's missing info from dynamic libraries? If your GHC is dynamically linked the library DWARF info might be available in their respective .so's.

Cheers,
Adam Sandberg Eriksson

On Sat, 2 May 2020, at 23:08, Matthew Pickering wrote:
> I followed the instructions on the wiki to enable debug symbols in my
> build of GHC. 
> (https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian#enabling-dwarf-debug-symbols)
> 
> So I added these flags to may hadrian.settings file
> 
> stage1.*.ghc.hs.opts += -g3
> stage1.*.cabal.configure.opts += --disable-library-stripping
> --disable-executable-stripping
> stage1.ghc-bin.ghc.link.opts += -eventlog
> 
> The resulting executable has debug information in it for the
> executable component but not for any of the libraries in including the
> compiler library.
> 
> ("../sysdeps/x86_64/start.S",Just 4414944,Just 4414987,139633489318136)
> ("init.c",Nothing,Nothing,139633489318136)
> ("../sysdeps/x86_64/crti.S",Nothing,Nothing,139633489318136)
> ("ghc/Main.hs",Just 4415312,Just 4615455,139633489318136)
> ("ghc/GHCi/Leak.hs",Just 4615480,Just 4623414,139633489318136)
> ("ghc/GHCi/UI.hs",Just 4623440,Just 5461990,139633489318136)
> ("ghc/GHCi/UI/Info.hs",Just 5461992,Just 5571230,139633489318136)
> ("ghc/GHCi/UI/Monad.hs",Just 5571232,Just 5679695,139633489318136)
> ("ghc/GHCi/UI/Tags.hs",Just 5679696,Just 5704775,139633489318136)
> ("ghc/GHCi/Util.hs",Just 24,Just 173,139633489318136)
> ("../sysdeps/x86_64/crtn.S",Nothing,Nothing,139633489318136)
> 
> I tried building a project with cabal and the resulting executable had
> debug information for every file in the dependencies as well as the
> main project.
> 
> So how do I convince hadrian to include the correct information? Is it
> a bug in hadrian?
> 
> I checked the command line when building the library and `-g3` is passed.
> 
> Cheers,
> 
> Matt
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>


More information about the ghc-devs mailing list