summaryrefslogtreecommitdiff
path: root/rts/Libdw.c
Commit message (Collapse)AuthorAgeFilesLines
* Prefer #if defined to #ifdefBen Gamari2017-04-281-1/+1
| | | | Our new CPP linter enforces this.
* Fix detection and use of `USE_LIBDW`Erik de Castro Lopo2016-06-011-1/+1
| | | | | | | | | | | | Test Plan: Configure/build with and without --enable-libdw Reviewers: trofi, hvr, austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2276
* rts: Limit maximum backtrace depthBen Gamari2016-04-181-3/+13
| | | | | This prevents us from entering an infinite loop in the event of a hitting bad unwinding information.
* libdw: enable support only on i386 and amd64Sergei Trofimovich2015-12-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently libdw requires per-arch implementation of set_initial_registers() function. Otherwise build fails with linkage error (seen on sparc): rts/dist/build/libHSrts_thr-ghc7.11.20151129.so: undefined reference to `set_initial_registers' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1 Converted link-time error to compile-time error, added arch whitelist. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1567
* rts: Expose more libdw symbolsBen Gamari2015-11-231-4/+18
|
* Libdw: Fix initial register collection on i386Ben Gamari2015-11-231-1/+2
| | | | RIP-relative addressing isn't available on i386.
* Libdw: Fix build on 32-bit platformsBen Gamari2015-11-231-5/+6
| | | | | | The casting here is a bit tricky since Dwarf_Addr is always 64-bits. This means we first need to narrow to uintptr_t before casting to/from a pointer for compatibility on 32-bit architectures.
* Libdw: Fix symbol namingBen Gamari2015-11-011-31/+32
| | | | RTS convention is to use camel-case.
* Libdw: Remove special treatment for stg_stop_threadBen Gamari2015-11-011-4/+1
| | | | | This is no longer necessary since this symbol can be unwound through with its DWARF information.
* Remove redundant typedefGabor Greif2015-10-261-2/+0
| | | | | | | | $ git grep -n "typedef struct LibDwSession_ " rts/Libdw.c:63:typedef struct LibDwSession_ LibDwSession; rts/Libdw.h:22:typedef struct LibDwSession_ LibDwSession; This trips up (e.g.) GCC v4.4.7.
* Libdw: Add libdw-based stack unwindingBen Gamari2015-10-171-0/+334
This adds basic support to the RTS for DWARF-assisted unwinding of the Haskell and C stack via libdw. This only adds the infrastructure; consumers of this functionality will be introduced in future diffs. Currently we are carrying the initial register collection code in Libdw.c but this will eventually make its way upstream to libdw. Test Plan: See future patches Reviewers: Tarrasch, scpmw, austin, simonmar Reviewed By: austin, simonmar Subscribers: simonmar, thomie, erikd Differential Revision: https://phabricator.haskell.org/D1196 GHC Trac Issues: #10656