Skip to content

Getting backtrace to work #554

Answered by vfsfitvnm
HeisenBuerger42 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi 😄
The backtracer entirely relies on Frida's Thread::backtrace - here's how I use it:

Interceptor.attach(method.virtualAddress, function () {
if (this.threadId == threadId) {
const handles = globalThis.Thread.backtrace(this.context, mode);
handles.unshift(method.virtualAddress);
for (const handle of handles) {
if (handle.compare(Il2Cpp.module.base) > 0 && handle.compare(Il2Cpp.module.base.add(Il2Cpp.module.size)) < 0) {
const method = searchInsert(handle);
if (method) {
const offset = handle.sub(method.virtualAddress);
if (offset.compare(0xfff) < 0) {

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HeisenBuerger42
Comment options

Answer selected by HeisenBuerger42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants