Maybe already known stuff, but.....

Ben Klein shacklein at gmail.com
Mon Apr 20 23:44:17 CDT 2009


2009/4/21 Massimo Del Fedele <max at veneto.com>:
> Today I found this :
>
> #include "execinfo.h"
>
> void BT(void)
> {
>        void *array[50];
>        size_t size;
>        char **strings;
>        size_t i;
>
>        size = backtrace (array, 50);
>        strings = backtrace_symbols (array, size);
>
>        printf ("Obtained %zd stack frames.\n", size);
>
>        for (i = 0; i < size; i++)
>        printf ("%s\n", strings[i]);
>
>        free (strings);
> }
>
> That allow to dump a backtrace (here max 50 frames) from inside a running
> program.
> Quite useful if app is non debuggable and don't run with +relay on because
> of copy protection.

Are there any cases like that where the sourcecode of the app is available?



More information about the wine-devel mailing list