-
Notifications
You must be signed in to change notification settings - Fork 561
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
add API routine to create a basic block without executing it #1594
Comments
Xref #2463 where we've added a related interface but it's targeted more toward the start/stop API. |
I'm going to quote from #2463 on the mcontext concern:
|
Re: the ISA mode: we should add code to set the mode based on the LSB of the bit in the bb tag, as I believe today the decoder/disassembler will switch modes based on LSB but only temporarily and I'm not sure it will be enough for the rest of bb building where we assume the whole block is one mode and may not check every instr's mode?? Needs investigation: maybe it does work. |
Quoting from dup issue #2561:
void *drcontext = dr_get_current_drcontext();
dr_prepopulate_cache(tags, count);
dr_switch_to_dr_state_ex(drcontext, DR_STATE_GO_NATIVE);
It's sounding like we can extend #2463's pre-population-before-start to mid-execution with just the state shift change here, along with documenting some of the caveats listed above (mcontext-at-top-of-bb assumptions in some clients), and with checking and ensuring the ISA mode does the right thing. Re: the lazy linking concerns listed up front: I don't think they're anything that will cause trouble. |
There are some use cases that involve creating a basic block but not executing it. This has some potential issues with DR assumptions on execution (current isa mode, mcontext state at top of bb, trace building, lazy linking) but I do not think there are any roadblocks.
The text was updated successfully, but these errors were encountered: