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

Display stack layout #5

Open
philipc opened this issue Oct 28, 2017 · 3 comments
Open

Display stack layout #5

philipc opened this issue Oct 28, 2017 · 3 comments

Comments

@philipc
Copy link
Collaborator

philipc commented Oct 28, 2017

Use DWARF locations to determine the stack layout.

@jrmuizel
Copy link

jrmuizel commented Nov 3, 2017

This seems like it would be quite valuable. I don't know of any other tool that exposes this kind of information.

@philipc
Copy link
Collaborator Author

philipc commented Oct 3, 2018

This is partially done using DW_OP_fbreg and DW_OP_call_frame_cfa in location expressions. To do better, I think I need to also handle DW_OP_breg*, but for that I also need to determine how the base register relates to the stack frame... maybe this can be determined by getting the CFA from the CFI. Also, need to investigate how complete this information is going to be... there's big holes in the current output, and I don't think that DW_OP_breg* will be enough to fix that.

@philipc
Copy link
Collaborator Author

philipc commented Oct 4, 2018

If you just want the stack size, there's also https://github.com/japaric/stack-sizes/

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

No branches or pull requests

2 participants