You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application where I want to extract traces on crashes, but I already have a backtrace data structure on the application layer. With the current way backtrace works I'd have to allocate a second set of array, populate it and then copy it to my application's structure.
I'm thinking about extending the library so it works similarly to _Unwind_Backtrace where you provide a callback that handles the copying (on a frame by frame basis) and decides when to stop. Essentially, in addition to the current API:
In addition to the previous API where the caller provided a buffer and a size,
it's now possible to instead proviced a callback and a context. This allows
the caller to use their own data structures without having to allocate an
additional set of objects to pass to backtrace.
The old API is still intact but has internally been rewritten to also use the
callback mechanisms. Note that this does increase the stack strain a bit as
each frame has to go through the callback.
Additionally, this also adds support for traversing a frame provided by the
user, with or without callbacks).
Closesred-rocket-computing#10
I have an application where I want to extract traces on crashes, but I already have a backtrace data structure on the application layer. With the current way
backtrace
works I'd have to allocate a second set of array, populate it and then copy it to my application's structure.I'm thinking about extending the library so it works similarly to
_Unwind_Backtrace
where you provide a callback that handles the copying (on a frame by frame basis) and decides when to stop. Essentially, in addition to the current API:two new functions would be introduced:
Is that something you'd need/want upstream? If so I can do it on Github and make a proper PR.
The text was updated successfully, but these errors were encountered: