Re: [Vala] How to use vala Linux.backtrace?



Andrea Del Signore <sejerpz    > writes:

private static void print_backtrace () {
        void*[] array = new void*[10];

        int size = Linux.backtrace (array, 10);

        string[] strings = Linux.backtrace_symbols (array, size);
        for(int i=0; i< size; i++) {
                print ("(%d): %s\n", i, strings[i]);
        }
}


I get a segmentation fault when I try to access any element in the strings
array. (In the print method)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]