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

2020-05-03 Thread Sylvain Henry
I wonder how gdb knows which shared objects to load and what addresses to use Perhaps it reads /proc/PID/maps (or /proc/PID/map_files/*)? Cheers, Sylvain On 03/05/2020 09:55, Matthew Pickering wrote: Thanks Adam for the tip about dynamic linking, as always. He was right that the debug

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

2020-05-03 Thread Matthew Pickering
Thanks Adam for the tip about dynamic linking, as always. He was right that the debug information was in the relevant .so files and that when I statically linked GHC the information was included (as with cabal). The issue was my program which read the dwarf information did not work properly for

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

2020-05-03 Thread Adam Sandberg Eriksson
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

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

2020-05-02 Thread Matthew Pickering
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 +=