How can I get a backtrace?

69 views
Skip to first unread message

Arca

unread,
Apr 2, 2021, 3:51:55 AM4/2/21
to DynamoRIO Users
I want to use dynamorio and libunwind to get backtrace of when a specific function is executed. However, when using libunwind, only the backtrace of the dynamorio plugin is shown.

Derek Bruening

unread,
Apr 2, 2021, 4:48:30 PM4/2/21
to dynamor...@googlegroups.com
You didn't say what context you passed to libunwind, but if you gave it a client context, you would naturally expect a client callstack and not an app callstack, right?  Xref feature request issues on providing a callstack library: https://github.com/DynamoRIO/dynamorio/issues/2414https://github.com/DynamoRIO/drmemory/issues/823.  For unix, if the private copy of libunwind will operate nicely in an isolated way, maybe the simplest thing is to add support to construct the machine context of the app in the format libunwind wants, if all that's needed is the callstack walk and not callstack storage or persistence or compression.  If someone does build that support, please consider contributing it as a new extension library or something.

On Fri, Apr 2, 2021 at 3:51 AM Arca <arc...@aias.io> wrote:
I want to use dynamorio and libunwind to get backtrace of when a specific function is executed. However, when using libunwind, only the backtrace of the dynamorio plugin is shown.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/c7572dca-3586-49d1-96b9-dc3c13b7aa02n%40googlegroups.com.

Derek Bruening

unread,
Oct 13, 2021, 4:06:12 PM10/13/21
to DynamoRIO Users
A drcallstack library was just added to the repository which provides libunwind callstack walking.  See sample usage at https://github.com/DynamoRIO/dynamorio/blob/master/api/samples/callstack.cpp.
Reply all
Reply to author
Forward
0 new messages