From 3b047be851f289e30ea9bd0b7bf9a10afe99895a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Sat, 7 Dec 2019 01:32:18 +0100 Subject: [PATCH] Sync frida-gum typings with Frida 12.7.25 (#40868) Changelog at: https://www.frida.re/news/2019/09/18/frida-12-7-released/ --- types/frida-gum/index.d.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/types/frida-gum/index.d.ts b/types/frida-gum/index.d.ts index 83cb34f3fe..e202f08570 100644 --- a/types/frida-gum/index.d.ts +++ b/types/frida-gum/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package frida-gum 14.2 +// Type definitions for non-npm package frida-gum 14.3 // Project: https://github.com/frida/frida // Definitions by: Ole André Vadla Ravnås // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -935,6 +935,11 @@ interface ModuleSymbolDetails { * Absolute address. */ address: NativePointer; + + /** + * Size in bytes, if available. + */ + size?: number; } type ModuleImportType = "function" | "variable"; @@ -4043,7 +4048,7 @@ declare namespace Java { * * @param className Canonical class name to get a wrapper for. */ - function use(className: string): Wrapper; + function use(className: string, options?: UseOptions): Wrapper; /** * Opens the .dex file at `filePath`. @@ -4139,6 +4144,17 @@ declare namespace Java { onComplete: () => void; } + interface UseOptions { + /** + * Whether to consult the class wrapper cache – which is the default + * behavior – or skip it and create a brand new class wrapper. + * + * Skipping the cache is useful when dealing with multiple class-loaders + * and colliding class names. + */ + cache?: "consult" | "skip"; + } + interface ChooseCallbacks { /** * Called with each live instance found with a ready-to-use `instance`