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 #1

Closed
xsleonard opened this issue Dec 29, 2013 · 7 comments
Closed

Debug symbols #1

xsleonard opened this issue Dec 29, 2013 · 7 comments

Comments

@xsleonard
Copy link

What would it take to get debug info working? I am trying to cross compile go+cgo which relies on DWARF abbrev, info and str fields for linking go with the object files

@tpoechtrager
Copy link
Owner

Well, it would require a port of the dsymutil - but the source code of it isn't publicly available, so it can't be ported.

The only way would be to get the original OS X dsymutil binary working on Linux (would prefer to have native binaries for everything).

Maybe https://github.com/shinh/maloader would be an option.
But I am really not happy about the build dependencies of it (native libc++ and OpenCFlite to get dsymutil working).

Will give it a try, but it will take a few days (or maybe a week or two) as I am currently busy with other thing.

@xsleonard
Copy link
Author

I may look into maloader but I agree, the dependencies are not ideal.

Regardless, this is fantastic. I've been looking to target OS X from linux for years. Thanks

@tpoechtrager
Copy link
Owner

Thanks, glad to hear that.

@xsleonard
Copy link
Author

I am unclear on the details of this, but is dsymutil necessary for writing DWARF's .debug_abbrev to the .o files? It sounds like dsymutil operates on existing DWARF data embedded in the .o files to generate a dSYM file.

@tpoechtrager
Copy link
Owner

It must be dsymutil (not an expert about it) because that tool is the only difference.

If you get dsymutil somehow working, then don't forget to remove the -g0 (${1+"$@"} -g0 -> ${1+"$@"}) in the wrapper file (oclang/oclang), then re-run ./build.sh.

If you are using gcc, then you must remove patch -p0 < $OSXCROSS_PATCH_DIR/gcc-dsymutil.patch from build_gcc.sh, then rebuild gcc (run rm build/have_gcc* first).

tpoechtrager added a commit that referenced this issue Mar 26, 2014
…s in a more simple way (fixes #1)

remove the gcc dsymutil patch (no longer needed)
tpoechtrager added a commit that referenced this issue Jun 13, 2015
This reverts commit 7e9f856.

it's too early, llvm-dsymutil still has a lot of issues
@tamird
Copy link

tamird commented Nov 7, 2015

This issue should probably be reopened, since debug info still doesn't work.

@tpoechtrager
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants