print thread backtrace

This commit is contained in:
Iddo 2018-06-03 12:02:44 +03:00 committed by GitHub
parent 1a41f6f588
commit c60a077821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,10 @@ Interceptor.attach(Module.findExportByName(null, "dlopen"), {
var offset = Module.findBaseAddress("libfoo.so"); // Process.findModuleByName("libfoo.so").base) will also work
Interceptor.attach(offset.add(funcAddr), {
onEnter: function(args) {
console.log('hooked !');
console.log('hooked !');
Thread.backtrace(this.context, Backtracer.ACCURATE).forEach(function(addr) {
console.log('\t' + addr + ' : ' + DebugSymbol.fromAddress(addr));
});
}
});
}