[GHC] #12397: Support for PDB debug information generation

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Keywords: | Operating System: Windows Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- It would be great if GHC support PDB files for debugging. This will help in Windows debugging and it will gain more stronger positions on Windows platform. Here I found format description. I'm not sure if it is similar to DWARF so it could be easily generated from existing DWARF implementation. https://github.com/Microsoft/microsoft-pdb -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by varosi: @@ -3,1 +3,2 @@ - platform. + platform. There are great Windows tools for profiling and debugging that + are sitting on PDB files. New description: It would be great if GHC support PDB files for debugging. This will help in Windows debugging and it will gain more stronger positions on Windows platform. There are great Windows tools for profiling and debugging that are sitting on PDB files. Here I found format description. I'm not sure if it is similar to DWARF so it could be easily generated from existing DWARF implementation. https://github.com/Microsoft/microsoft-pdb -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): I'm very keen on this myself, but last time I looked at this the repository wasn't in a very usable state. The repository basically contains the structures definition and it seems they added the streams implementation now to. But the bulk of the code is in Mscorpdb.dll which is proprietary and we can't redistribute it. So the situation is kind of hard until someone implements an open source variant of that (Since I think GHC has too many Linux/Mac only developers to foster such a project for the Windows world, and maintain it). Currently I believe libDWARF is used for DWARF support. I'm hoping for Microsoft to either release the code for Mscorpdb.dll or change the licensing.. Alternatively, we could use tools that convert from DWARF to PDB as a post-build step, such as https://github.com/rainers/cv2pdb . But yeah Ideally we would be able to generate it ourselves. I have been thinking about trying to use the code for that tool and internally do a DWARF to PDB conversion. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): One easier way would be to re-use the `llvm` PDB code[1]. It's nicely separated out and should be easy to plug in. Code seems to be on an MIT license. [1]https://github.com/llvm-mirror/llvm/tree/master/lib/DebugInfo/PDB -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Be aware that we are still [[DWARF/80Status|struggling]] to provide correct DWARF annotations. There are still a lot of open questions in this area. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by varosi): Possible implementation in 8.4? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari):
Possible implementation in 8.4?
This really depends upon whether someone steps up to implement it. If so, sure; I will happily accept a patch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by varosi): As a temporary workaround I found a tool for convertion of DWARF to PDB which seems to work good: https://github.com/rainers/cv2pdb -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12397: Support for PDB debug information generation -------------------------------------+------------------------------------- Reporter: varosi | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Debugging) | Resolution: | Keywords: DWARF Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: => DWARF -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12397#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC