Skip to content

Commit

Permalink
🤖 Merge PR #58711 Sync frida-gum typings with Frida 15.1.17 by @oleavr
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr authored Feb 11, 2022
1 parent 6465158 commit 37db50e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
4 changes: 2 additions & 2 deletions types/frida-gum/frida-gum-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ Java.perform(() => {
});
});

// $ExpectType Frame[]
// $ExpectType Backtrace
Java.backtrace();
// $ExpectType Frame[]
// $ExpectType Backtrace
Java.backtrace({ limit: 42 });
});
47 changes: 21 additions & 26 deletions types/frida-gum/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for non-npm package frida-gum 17.3
// Type definitions for non-npm package frida-gum 18.0
// Project: https://github.com/frida/frida
// Definitions by: Ole André Vadla Ravnås <https://github.com/oleavr>
// Francesco Tamagni <https://github.com/mrmacete>
Expand Down Expand Up @@ -4513,11 +4513,9 @@ declare namespace Java {
/**
* Generates a backtrace for the current thread.
*
* Note that this API is unstable and subject to change.
*
* @param options Options to customize the stack-walking.
*/
function backtrace(options?: BacktraceOptions): Frame[];
function backtrace(options?: BacktraceOptions): Backtrace;

/**
* Determines whether the caller is running on the main thread.
Expand Down Expand Up @@ -4644,39 +4642,36 @@ declare namespace Java {
}

/**
* Stack frame returned by `Java.backtrace()`.
* Backtrace returned by `Java.backtrace()`.
*/
interface Frame {
interface Backtrace {
/**
* Method being called.
* ID that can be used for deduplicating identical backtraces.
*/
method: {
/**
* The jmethodID of the method. On ART, this is an `ArtMethod *`.
*/
handle: NativePointer;
id: string;

/**
* Method name, e.g. `"loopOnce"`.
*/
name: string;

/**
* Return type, e.g. `"boolean"`.
*/
returnType: string;
/**
* Stack frames.
*/
frames: Frame[];
}

/**
* Argument types, e.g. `["android.os.Looper", "long", "int"]`.
*/
argumentTypes: string[];
};
interface Frame {
/**
* Signature, e.g. `"Landroid/os/Looper;,loopOnce,(Landroid/os/Looper;JI)Z"`.
*/
signature: string;

/**
* Class name that method belongs to, e.g. `"android.os.Looper"`.
*/
className: string;

/**
* Method name, e.g. `"loopOnce"`.
*/
methodName: string;

/**
* Source file name, e.g. `"Looper.java"`.
*/
Expand Down

0 comments on commit 37db50e

Please sign in to comment.