🌐
Dyninst
dyninst.github.io › scalable_tools_workshop › petascale2017 › assets › slides › DWARF.pdf pdf
DWARF & ELF Utilities 1. Documentation for libdw & 2. ...
The 11th Scalable Tools Workshop (formerly the Petascale Tools Workshop and CSCADS Workshop on Petascale Tools) will be held Sunday, August 6-Thursday, August 10 this year at the Granlibakken Resort in Lake Tahoe, California. As in previous years, we will begin with presentations of people’s ...
🌐
Rust
docs.rs › libdw-sys
libdw_sys - Rust
API documentation for the Rust `libdw_sys` crate.
🌐
Rust
docs.rs › libdw › latest › libdw
libdw - Rust
API documentation for the Rust `libdw` crate.
🌐
Debian
packages.debian.org › sid › libdw-dev
Details of package libdw-dev in sid
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
GNU
sourceware.org › elfutils
The elfutils project
libdw · dwarf, dwfl and dwelf functions to read DWARF, find separate debuginfo, symbols and inspect process state. libasm · asm and disasm functions to assemble and disassamble instructions (partial support for i686 and BPF instructions only). Included utilities: eu-addr2line ·
🌐
GitHub
github.com › kushaldas › elfutils › blob › master › libdw › libdw.h
elfutils/libdw/libdw.h at master · kushaldas/elfutils
#ifndef _LIBDW_H · #define _LIBDW_H 1 · · #include <gelf.h> #include <stdbool.h> #include <stddef.h> ·
Author   kushaldas
🌐
GitHub
github.com › kushaldas › elfutils › tree › master › libdw
elfutils/libdw at master · kushaldas/elfutils
My elfutils fork. Contribute to kushaldas/elfutils development by creating an account on GitHub.
Author   kushaldas
🌐
Reddit
reddit.com › r/haskell › so, like, what's up with libdw, exactly?
r/haskell on Reddit: So, like, what's up with libdw, exactly?
October 29, 2017 -

The mysterious module GHC.ExecutionStack states

Your GHC must have been built with libdw support for this to work.

 user@host:~$ ghc --info | grep libdw
 ,("RTS expects libdw","YES")

Using stack at least, even with the latest GHC 8.2 nightly snapshot, I instead get this:

$ stack exec -- ghc --info | grep libdw
47: ,("RTS expects libdw","NO")

and indeed, testing out the snippet in the module's documentation simply prints out Nothing.

Now, apart from the source code for protolude, it would appear that absolutely no open-source code imports GHC.ExecutionStack. There is barely any documentation on what this should look like, and more importantly, whether I have to build my own version of GHC to enable this feature.

I'm just looking for pain-free stack traces. +RTS -xc spurts out a thousand stack traces a second as it appears that GHC uses exceptions for multithreading and/or STM, and -xc seems to print out a stack trace even if the exception was caught (I'm guessing here -- -xc's output is too noisy to be useful). Even using profiling is not entirely useful, as now the uncaught exception I'm trying to fix is printed without an accompanying stack trace; moreover, I would like to leave stack traces on permanently, and I don't want to enable profiling in my final build.

Does anyone have any experience with this module, or some background knowledge as to why this functionality appears to be disabled by default? Remember, I'm trying to get full, permanently-on stack traces, which I can use to debug code running on production, so that I'm not left stumped when some random code throws a terse "*** Exception: Prelude.undefined" at me...

Thoughts and prayers?

Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 77073605 › how-to-find-the-function-die-debugging-information-entry-using-libdw-given-an
c - How to find the function DIE (Debugging Information Entry) using libdw, given an eip (instruction pointer)? - Stack Overflow
Libdw, part of elfutils, is more recent than libdwarf. Unfortunately there is virtually no available documentation, nor examples. I just finished writing a program that, given an instruction pointe...
🌐
Docs.rs
docs.rs › crate › libdw › 0.0.1
libdw 0.0.1 - Docs.rs
Feature flags Documentation · Links · cuviper/elfutils-rs 4 1 0 · crates.io · Dependencies · libdw-sys ^0.0.1 ·
🌐
Debian
packages.debian.org › bullseye › libdw-dev
Debian -- Details of package libdw-dev in bullseye
dep: libdw1 (= 0.183-1) library that provides access to the DWARF debug information · dep: libelf-dev · libelf1 development libraries and header files · dep: liblzma-dev · XZ-format compression library - development files · dep: zlib1g-dev · compression library - development · This page is also available in the following languages (How to set the default document language): Български (Bəlgarski) dansk Deutsch suomi français magyar Italiano 日本語 (Nihongo) Nederlands polski Português (br) Русский (Russkij) slovensky svenska Türkçe українська (ukrajins'ka) 中文 (Zhongwen,简) 中文 (Zhongwen,繁) See our contact page to get in touch.
🌐
ROS
index.ros.org › › d › libdw-dev
libdw-dev - rosdep System Dependency Overview
{"arch"=>["libelf"], "debian"=>["libdw-dev"], "fedora"=>["elfutils-devel"], "gentoo"=>["dev-libs/elfutils"], "nixos"=>["elfutils"], "openembedded"=>["elfutils@openembedded-core"], "opensuse"=>["libdw-devel"], "osx"=>{"homebrew"=>{"packages"=>["elfutils"]}}, "rhel"=>["elfutils-devel"], "ubuntu"=>["libdw-dev"]}
🌐
GitHub
github.com › kurniawano › libdw
GitHub - kurniawano/libdw: Library for Digital World
#!/usr/bin/env python from libdw import kinematics as kn from libdw import sm
Author   kurniawano
🌐
Ubuntu
packages.ubuntu.com › focal › libdw-dev
Details of package libdw-dev in focal
two or more packages specified (libdw-dev focal) Content Copyright © 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
GNU
sourceware.org › legacy-ml › elfutils-devel › imported › msg00864.html
Milian Wolff - example for using libdw(fl) for in-process stack unwinding?
June 9, 2016 - For reference, here's my current non-functional attempt, which you can compile with g++ -ldw -lelf -std=c++11 -g -O0 backtrace.cpp -o backtrace ~~~~~~~~~~~~~~~~~~~~~~~ #define PACKAGE #define PACKAGE_VERSION #include <elfutils/libdw.h> #include <elfutils/libdwfl.h> #include <unistd.h> #include <cassert> #include <fcntl.h> namespace dw { static const Dwfl_Callbacks offline_callbacks = { dwfl_build_id_find_elf, dwfl_standard_find_debuginfo, // TODO: we are in-process, not offline, or?
🌐
Alpine Linux
pkgs.alpinelinux.org › package › edge › main › x86 › libdw
libdw - Alpine Linux packages
December 6, 2025 - Package details · Depends (8) · libelf · so:libbz2.so.1 · so:libc.musl-x86.so.1 · so:libelf.so.1 · so:libfts.so.0 · so:liblzma.so.5 · so:libz.so.1 · so:libzstd.so.1
🌐
Debian
packages.debian.org › bookworm › libdw-dev
Debian -- Details of package libdw-dev in bookworm
dep: libdw1 (= 0.188-2.1) library that provides access to the DWARF debug information · dep: libelf-dev · libelf1 development libraries and header files · dep: liblzma-dev · XZ-format compression library - development files · dep: zlib1g-dev · compression library - development · This page is also available in the following languages (How to set the default document language): Български (Bəlgarski) dansk Deutsch suomi français magyar Italiano 日本語 (Nihongo) Nederlands polski Português (br) Русский (Russkij) slovensky svenska Türkçe українська (ukrajins'ka) 中文 (Zhongwen,简) 中文 (Zhongwen,繁) See our contact page to get in touch.