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

debug symbols don't work on windows #516

Closed
andrewrk opened this issue Oct 2, 2017 · 3 comments
Closed

debug symbols don't work on windows #516

andrewrk opened this issue Oct 2, 2017 · 3 comments
Labels
bug Observed behavior contradicts documented or intended behavior os-windows upstream An issue with a third party project that Zig uses.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Oct 2, 2017

Here's a zig program:

const c = @cImport({
    @cDefine("_NO_CRT_STDIO_INLINE", "1");
    @cInclude("stdio.h");
    @cInclude("string.h");
});

const msg = c"Hello, world!\n";

export fn main(argc: c_int, argv: &&u8) -> c_int {
    if (c.printf(msg) != c_int(c.strlen(msg)))
        return -1;

    @panic("ahhh");
}

When you debug this with MSVC, there is no source code available.

@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior os-windows labels Oct 2, 2017
@andrewrk andrewrk added this to the 0.2.0 milestone Oct 2, 2017
@andrewrk
Copy link
Member Author

Working with Zachary Turner from the LLD team on this issue: https://bugs.llvm.org/show_bug.cgi?id=34910

andrewrk added a commit that referenced this issue Oct 17, 2017
See #516

now we have at least a callstack. we still need updated LLD
to get stack traces.
@andrewrk andrewrk modified the milestone: 0.2.0 Oct 19, 2017
@andrewrk
Copy link
Member Author

We added uwtable to functions and stack traces are present, still without debug symbols.

However I tested with llvm master branch and this issue is resolved. So this issue will be fixed when we update to use LLVM 6 (release date not yet announced).

@andrewrk
Copy link
Member Author

andrewrk commented Mar 9, 2018

Fixed with the merge of the llvm6 branch.

@andrewrk andrewrk closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior os-windows upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

No branches or pull requests

1 participant