Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haskell: add combinator to enable DWARF debugging #28854

Merged
merged 1 commit into from Sep 2, 2017

Conversation

domenkozar
Copy link
Member

@domenkozar domenkozar commented Sep 1, 2017

Tested using:

$ cat test-strip.nix
with (import ./. {});
with haskell.lib;

haskell.packages.ghc802.override {
  overrides = self: super: {
    microlens = enableDWARFDebugging super.microlens;
  };
}

$ nix-build -A microlens test-strip.nix
$ objdump -t <path-to-so-file>

This is useful for gdb debugging, as you finally get haskell symbols in bt output.

Tested using:

$ cat test-strip.nix
with (import ./. {});
with haskell.lib;

haskell.packages.ghc802.override {
  overrides = self: super: {
    microlens = enableDWARFDebugging super.microlens;
  };
}

$ nix-build -A microlens test-strip.nix
$ objdump -t <path-to-so-file>
@domenkozar
Copy link
Member Author

This helped us (re)discover https://ghc.haskell.org/trac/ghc/ticket/12690.

@peti I'm going to merge this, please comment if you have some feedback and I'll fix it.

@domenkozar domenkozar merged commit 991654f into master Sep 2, 2017
@wizeman wizeman deleted the haskell-dwarf-debugging branch October 30, 2017 15:20
@grahamc grahamc restored the haskell-dwarf-debugging branch October 30, 2017 15:54
@grahamc grahamc deleted the haskell-dwarf-debugging branch March 11, 2018 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants