Replies: 2 comments 1 reply
-
You can get the call stack of the current thread from a plugin with the following code: DBGCALLSTACK callstack = {};
if(!DbgFunctions()->GetCallStackEx(&callstack, /*cache=*/ false)) {
dputs("failed to get call stack");
return false;
}
for(int i = 0; i < callstack.total; i++) {
const auto& e= callstack.entries[i];
dprintf("callstack[%d] = { .addr = %p, .from = %p, .to = %p, comment = %s }", i, e.addr, e.from, e.to, e.comment);
}
BridgeFree(callstack.entries); To do this at every breakpoint you can register a CBBREAKPOINT callback, but most likely you will want to create your own command with Could you explain what you end goal is with this? Because there might be an easier way to achieve it... |
Beta Was this translation helpful? Give feedback.
1 reply
-
If you don't want to write a plugin, you can also use printstack command to print the call stack in log. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature type
Plug-ins
Describe the feature
is there has any plugin to getcallstack when breakpoint is hit? if not, can someone provide some ideas on how to implement it? I have read the developer documentation but couldn't find a directly usable API.
Beta Was this translation helpful? Give feedback.
All reactions