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

DDR JIT stack walker takes insufficient parameters #5966

Open
gacholio opened this issue May 31, 2019 · 5 comments
Open

DDR JIT stack walker takes insufficient parameters #5966

gacholio opened this issue May 31, 2019 · 5 comments

Comments

@gacholio
Copy link
Contributor

gacholio commented May 31, 2019

The !jitstack and !jitstackslots command in DDR are used to start the stack walk at a JIT frame by providing sufficient root values to walk the stack.

Currently, the root values are vmThread, SP, PC and (optionally) ELS. For a complete walk, values for j2iFrame and i2jState must also be provided (like ELS, they are currently inferred from the vmThread). The two new args should be added as optional.

j2iFrame is either NULL (if no jit->interp transition has ever taken place) or the BP value of the j2i frame.

i2jState starts off pointing to the ELS i2jState, but is updated to point into the j2i frame each time one is seen.

Almost all real-world uses of these extensions target a JIT frame very near the top of the stack, so this has not been an issue.

@gacholio
Copy link
Contributor Author

Discovered while debugging #5449

@gacholio
Copy link
Contributor Author

gacholio commented Jun 3, 2019

While we're at it, both the C and DDR walkers should output the j2iFrame and i2jState values at the start of the walk and when they get updated.

@gacholio
Copy link
Contributor Author

gacholio commented Jun 4, 2019

In fact, all of the stack commands should take the new optional parameters.

@gacholio
Copy link
Contributor Author

We will want the initial decompilation stack as an extra parameter as well.

@gacholio
Copy link
Contributor Author

Suggest the new parm order be:

thread,pc,sp,a0,pc,literals,decomp,j2iframe,i2jstate

with the last three being optional

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

1 participant