[commit: ghc] master: Add ability to produce crash dumps on Windows (ec9ac20)

git at git.haskell.org git at git.haskell.org
Tue Oct 3 21:56:10 UTC 2017


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

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

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

commit ec9ac20d0964c9f1323105b5a2df24f50d4fe3ef
Author: Tamar Christina <tamar at zhox.com>
Date:   Tue Oct 3 13:37:52 2017 -0400

    Add ability to produce crash dumps on Windows
    
    It's often hard to debug things like segfaults on Windows,
    mostly because gdb isn't always of use and users don't know
    how to effectively use it.
    
    This patch provides a way to create a crash drump by passing
    
    `+RTS --generate-crash-dumps` as an option. If any unhandled
    exception is triggered a dump is made that contains enough
    information to be able to diagnose things successfully.
    
    Currently the created dumps are a bit big because I include
    all registers, code and threads information.
    
    This looks like
    
    ```
    $ testsuite/tests/rts/derefnull.run/derefnull.exe +RTS
    --generate-crash-dumps
    
    Access violation in generated code when reading 0000000000000000
    Crash dump created. Dump written to:
            E:\msys64\tmp\ghc-20170901-220250-11216-16628.dmp
    ```
    
    Test Plan: ./validate
    
    Reviewers: austin, hvr, bgamari, erikd, simonmar
    
    Reviewed By: bgamari, simonmar
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3912


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

ec9ac20d0964c9f1323105b5a2df24f50d4fe3ef
 docs/users_guide/8.4.1-notes.rst     |  3 ++
 docs/users_guide/runtime_control.rst |  7 +++++
 includes/rts/Flags.h                 |  1 +
 libraries/base/GHC/RTS/Flags.hsc     |  2 ++
 libraries/base/changelog.md          |  3 ++
 rts/RtsFlags.c                       | 15 ++++++++++
 rts/package.conf.in                  |  1 +
 rts/win32/veh_excn.c                 | 58 +++++++++++++++++++++++++++++++++++-
 rts/win32/veh_excn.h                 |  3 ++
 9 files changed, 92 insertions(+), 1 deletion(-)

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 ec9ac20d0964c9f1323105b5a2df24f50d4fe3ef


More information about the ghc-commits mailing list