http://downloads.haskell.org/~ghc/8.2.1/docs/html/users_guide/debug-info.html TL;DR Build your code with -g and GHC includes dwarf debugging information. libdw is used for interpreting dwarf information and backtrace support. You can send SIGUSR2 to a compiled program to get it to dump stack traces on stderr. You can also use this module to get backtraces programmatically as you wish. It requires Linux, and a custom GHC. This module is still fairly experimental and I believe Ben only got DWARF information working reliably in the 8.2.x branch (there's simply a terse "More reliable DWARF debug information" in the release notes). It's new enough that it's not really surprising nobody is using it yet... Answer from aseipp on reddit.com
🌐
GitHub
github.com › kushaldas › elfutils › blob › master › libdw › libdw.h
elfutils/libdw/libdw.h at master · kushaldas/elfutils
/* Interfaces for libdw. Copyright (C) 2002-2010 Red Hat, Inc. This file is part of Red Hat elfutils. · Red Hat elfutils is free software; you can redistribute it and/or modify · it under the terms of the GNU General Public License as published by the ·
Author   kushaldas
🌐
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 ·
Discussions

So, like, what's up with libdw, exactly?

http://downloads.haskell.org/~ghc/8.2.1/docs/html/users_guide/debug-info.html

TL;DR Build your code with -g and GHC includes dwarf debugging information. libdw is used for interpreting dwarf information and backtrace support. You can send SIGUSR2 to a compiled program to get it to dump stack traces on stderr. You can also use this module to get backtraces programmatically as you wish. It requires Linux, and a custom GHC.

This module is still fairly experimental and I believe Ben only got DWARF information working reliably in the 8.2.x branch (there's simply a terse "More reliable DWARF debug information" in the release notes). It's new enough that it's not really surprising nobody is using it yet...

More on reddit.com
🌐 r/haskell
9
14
October 29, 2017
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... More on stackoverflow.com
🌐 stackoverflow.com
How does Libby work?
Get a library card at your local library or sign up for an e-card. On the Libby app, you will sign in to your library using your library card. Then you have access to the library’s digital content and you can “borrow”titles and open them on your kindle. Not every library has the Libby app but I’ve found a lot that do! Hoopla is another similar app. More on reddit.com
🌐 r/LibbyApp
20
24
October 9, 2023
How seriously do you take LIB?
I take it like 50% seriously. They're real people having real experiences and interactions with another human being whom they're trying to have a romantic connection with - that leads to real discussions from audience members. However they're also people who have chosen to go on a reality show to find love and I have to take that with a grain of salt because even if they genuinely think they could find a person through this process, majority of reality tv contestants choose to go on a show because they know they'll get their 15 minutes of fame More on reddit.com
🌐 r/LoveIsBlindNetflix
39
35
February 27, 2025
🌐
GitHub
github.com › kurniawano › libdw
GitHub - kurniawano/libdw: Library for Digital World
Libdw is a library used in 10.009 Digital World conducted at SUTD freshmore.
Author   kurniawano
🌐
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
🌐
Ubuntu
launchpad.net › ubuntu › jammy › +package › libdw-dev
libdw-dev : Jammy (22.04) : Ubuntu - Launchpad
libdw1 provides a library that provides access to DWARF debug information stored inside ELF files. . This package contains development libraries and header files for libdw1. . It also contains a static version of libdw.
🌐
PyPI
pypi.org › project › libdw
libdw · PyPI
Details for the file libdw-4.3.0.tar.gz.
      » pip install libdw
    
Published   Jan 08, 2020
Version   4.3.0
🌐
Debian
packages.debian.org › bullseye › libdw-dev
Debian -- Details of package libdw-dev in bullseye
This package contains development libraries and header files for libdw1.
Find elsewhere
🌐
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?

🌐
Debian
packages.debian.org › bookworm › libdw-dev
Debian -- Details of package libdw-dev in bookworm
This package contains development libraries and header files for libdw1.
🌐
Ubuntu
launchpad.net › ubuntu › bionic › +package › libdw-dev
libdw-dev : Bionic (18.04) : Ubuntu - Launchpad
libdw1 provides a library that provides access to DWARF debug information stored inside ELF files. . This package contains development libraries and header files for libdw1. . It also contains a static version of libdw.
🌐
GitHub
github.com › LLNL › Caliper › blob › master › cmake › FindLibDw.cmake
Caliper/cmake/FindLibDw.cmake at master · llnl/Caliper
# LIBDW_FOUND System has LIBDW libraries and headers · # LIBDW_LIBRARIES The LIBDW library · # LIBDW_INCLUDE_DIRS The location of LIBDW headers · · if (LIBDW_INCLUDE_DIR AND LIBDW_LIBRARY) set(LIBDW_FIND_QUIETLY true) endif() ·
Author   llnl
🌐
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 ...
🌐
crates.io
crates.io › crates › libdw
libdw - crates.io: Rust Package Registry
libdw v0.1.0 appears to have no README.md file · pkg:cargo/libdw@0.1.0 over 3 years ago · 2021 edition · MIT OR Apache-2.0 · 11 KiB · Run the following Cargo command in your project directory: cargo add libdw · Or add the following line to your Cargo.toml: libdw = "0.1.0" docs.rs/libdw/0.1.0 ·
🌐
Ubuntu
packages.ubuntu.com › jammy › libdw-dev
Ubuntu – Details of package libdw-dev in jammy
dep: libdw1 (= 0.186-1build1) [not amd64, i386] library that provides access to the DWARF debug information · dep: libdw1 (= 0.186-1ubuntu0.1) [amd64, i386] dep: libelf-dev · libelf1 development libraries and header files · dep: liblzma-dev · XZ-format compression library - development files ·
🌐
GitHub
github.com › cuviper › elfutils › blob › master › libdw › libdwP.h
elfutils/libdw/libdwP.h at master · cuviper/elfutils
Don't access directly, call __libdw_cu_base_address. */ Dwarf_Addr base_address; · /* The offset into the .debug_addr section where index zero begins. Don't access directly, call __libdw_cu_addr_base. */ Dwarf_Off addr_base; · /* The offset into the .debug_str_offsets section where index zero begins.
Author   cuviper
🌐
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...
🌐
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
🌐
Ubuntu
packages.ubuntu.com › bionic › libdw-dev
Ubuntu – Error
two or more packages specified (libdw-dev bionic) Content Copyright © 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
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"]}