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

[WIP] MacOS stack traces #1406

Merged
merged 11 commits into from
Aug 25, 2018
Merged

[WIP] MacOS stack traces #1406

merged 11 commits into from
Aug 25, 2018

Conversation

andrewrk
Copy link
Member

See #1365

Here's where this is at currently:

Test 1/1 aoeu...
reading .o file: /Users/andy/dev/zig/build/./zig-cache/test.o
sect: __debug_str
sect: __debug_loc
sect: __debug_abbrev
sect: __debug_info
sect: __debug_ranges
sect: __debug_macinfo
sect: __apple_names
sect: __apple_objc
sect: __apple_namespac__DWARF
sect: __apple_types
sect: __debug_frame
sect: __debug_line
???:?:?: 0x10336d7c7 in _aoeu (???)


???:?:?: 0x1033881a9 in _main.0 (???)


???:?:?: 0x103387ee9 in _callMain (???)


???:?:?: 0x103387e73 in _callMainWithArgs (???)


???:?:?: 0x103387db3 in _main (???)


???:?:?: 0x7fff7bd05015 in ??? (???)


The next step is to utilize the DWARF info that we now have found to do address to source lookup.

...rather than trying to find the executable on the file system.

Also use a more robust PIE offset calculation based on the
available metadata.

And for the last function, use the data that tells the end
rather than assuming 4K.

Also they print in a consistent way with Linux stack traces.
@andrewrk andrewrk added the work in progress This pull request is not ready for review yet. label Aug 24, 2018
@andrewrk andrewrk changed the title WIP: Macos stack traces [WIP] MacOS stack traces Aug 24, 2018
@andrewrk
Copy link
Member Author

screen shot 2018-08-24 at 2 30 41 pm

Just need to tidy up a few things on the mac code, and then fix up the linux code to do avoid the file system and remove some code duplication, and then this is ready for merge.

@andrewrk andrewrk removed the work in progress This pull request is not ready for review yet. label Aug 25, 2018
@andrewrk andrewrk merged commit 4003cd4 into master Aug 25, 2018
@andrewrk andrewrk deleted the macos-stack-traces branch August 25, 2018 08:50
@ghost
Copy link

ghost commented Aug 25, 2018

thanks !

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

Successfully merging this pull request may close these issues.

1 participant