frida / frida-gum

Cross-platform instrumentation and introspection library written in C
https://frida.re
Other
733 stars 242 forks source link

Custom-length backtraces #747

Closed davinci-tech closed 6 months ago

davinci-tech commented 1 year ago

This commit attempts to add a new parameter to the Thread.backtrace() method called limit, which, under-the-hood, uses the gum_backtracer_generate_with_limit method to create a custom-length backtrace. This change affects the gumjs bindings for both the v8 and quickjs runtimes.

oleavr commented 6 months ago

Thanks a lot! (And apologies for the delay.)

I've applied some style tweaks and started tinkering with a new API for Thread.backtrace(), where the second argument is an object with options. In this way we can add further options, like this one, and the code is a bit easier to read.

This feature also needs a test, so will try to do that early next week, and get this landed.

davinci-tech commented 6 months ago

This is amazing! Thank you very much!