[commit: ghc] master: Generate DWARF unwind information (edd6d67)

git at git.haskell.org git at git.haskell.org
Wed Dec 17 00:33:13 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/edd6d676847b94648c18b7f3790852ab4043759d/ghc

>---------------------------------------------------------------

commit edd6d676847b94648c18b7f3790852ab4043759d
Author: Peter Wortmann <scpmw at leeds.ac.uk>
Date:   Wed Dec 10 12:00:49 2014 +0100

    Generate DWARF unwind information
    
    This tells debuggers such as GDB how to "unwind" a program state,
    which allows them to walk the stack up.
    
    Notes:
    
    * The code is quite general, perhaps unnecessarily so. Unless we get
      more unwind information, only the first case of pprSetUnwind will
      get used - and pprUnwindExpr and pprUndefUnwind will never be
      called. It just so happens that this is a point where we can get a
      lot of features cheaply, even if we don't use them.
    
    * When determining what location to show for a return address, most
      debuggers check the map for "rip-1", assuming that's where the
      "call" instruction is. For tables-next-to-code, that happens to
      always be the end of an info table. We therefore cheat a bit here by
      shifting .debug_frame information so it covers the end of the info
      table, as well as generating a .loc directive for the info table
      data.
    
      Debuggers will still show the wrong label for the return address,
      though.  Haven't found a way around that one yet.
    
    (From Phabricator D396)


>---------------------------------------------------------------

edd6d676847b94648c18b7f3790852ab4043759d
 compiler/nativeGen/Dwarf.hs           |  45 ++++++-
 compiler/nativeGen/Dwarf/Constants.hs |  64 ++++++++-
 compiler/nativeGen/Dwarf/Types.hs     | 236 +++++++++++++++++++++++++++++++++-
 compiler/nativeGen/X86/Ppr.hs         |   6 +
 4 files changed, 347 insertions(+), 4 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc edd6d676847b94648c18b7f3790852ab4043759d


More information about the ghc-commits mailing list