Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
7822 commits behind, 629 commits ahead of the upstream repository.
  • Takenobu Tani's avatar
    3769e3a8
    Update Wiki URLs to point to GitLab · 3769e3a8
    Takenobu Tani authored and Marge Bot's avatar Marge Bot committed
    This moves all URL references to Trac Wiki to their corresponding
    GitLab counterparts.
    
    This substitution is classified as follows:
    
    1. Automated substitution using sed with Ben's mapping rule [1]
        Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
        New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...
    
    2. Manual substitution for URLs containing `#` index
        Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
        New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz
    
    3. Manual substitution for strings starting with `Commentary`
        Old: Commentary/XxxYyy...
        New: commentary/xxx-yyy...
    
    See also !539
    
    [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
    3769e3a8
    History
    Update Wiki URLs to point to GitLab
    Takenobu Tani authored and Marge Bot's avatar Marge Bot committed
    This moves all URL references to Trac Wiki to their corresponding
    GitLab counterparts.
    
    This substitution is classified as follows:
    
    1. Automated substitution using sed with Ben's mapping rule [1]
        Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
        New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...
    
    2. Manual substitution for URLs containing `#` index
        Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
        New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz
    
    3. Manual substitution for strings starting with `Commentary`
        Old: Commentary/XxxYyy...
        New: commentary/xxx-yyy...
    
    See also !539
    
    [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
Libdw.h 1.46 KiB
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 2014-2015
 *
 * Producing stacktraces with DWARF unwinding using libdw..
 *
 * Do not #include this file directly: #include "Rts.h" instead.
 *
 * To understand the structure of the RTS headers, see the wiki:
 *   https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes
 *
 * -------------------------------------------------------------------------- */

#pragma once

#include "BeginPrivate.h"

#if USE_LIBDW

/* Begin a libdw session. A session is tied to a particular capability */
LibdwSession *libdwInit(void);

/* Free a session */
void libdwFree(LibdwSession *session);

// Traverse backtrace in order of outer-most to inner-most frame
#define FOREACH_FRAME_INWARDS(pc, bt)                                 \
    BacktraceChunk *_chunk;                                           \
    unsigned int _frame_idx;                                          \
    for (_chunk = &bt->frames; _chunk != NULL; _chunk = _chunk->next) \
        for (_frame_idx=0;                                            \
             pc = _chunk->frames[_frame_idx], _frame_idx < _chunk->n_frames; \
             _frame_idx++)

// Traverse a backtrace in order of inner-most to outer-most frame
int libdwForEachFrameOutwards(Backtrace *bt,
                              int (*cb)(StgPtr, void*),
                              void *user_data);

#endif /* USE_LIBDW */

#include "EndPrivate.h"