On 3/31/2011 11:56 AM, Thomas De Schampheleire wrote:
> On Wed, Feb 23, 2011 at 6:03 AM, ANDY KENNEDY <[email protected]> wrote:
>>>>
>>>> So, initially it looks like this would (at least) work for mips32r2
>>>>
>>>
>>> Fine, please let us to know your outcomes.
>>
>>
>> Doh!  Stupid question:  How would I test that this _actually_ works?
>>
>> I mean, I tried this:
>>
>>
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <signal.h>
>> #include <execinfo.h>
>>
>> void *barray[128];
>>
>> static void segfault(int sgn) {
>>        size_t size = backtrace(barray, sizeof(barray));
>>        fprintf(stderr, "Backtrace: \n");
>>        backtrace_symbols_fd(barray, size, 2);
>>        abort();
>> }
>>
>> int f1(int *ptr)
>> {
>>        printf("Pointer = %i\n", *ptr);
>>        return 0;
>> }
>>
>> int f2(int *ptr)
>> {
>>        f1((int *)(ptr + 0x5555aaaa));
>>        return 0;
>> }
>>
>> int main(void)
>> {
>>        signal(11, segfault);
>>        f2((int *)109324);
>>        return 0;
>> }
>>
>> but I only got this:
>>
>> Backtrace:
>> Aborted
>>
>>
>> When I compile I have to specify -lubacktrace; however, when linking
>> against
>> glibc, the backtrace family is apparently included by default.
>>
>> FYI:  I get no linker errors, and no warnings.
>>
>> Please advise.
>>
>> Andy
> 
> Hi Andy,
> 
> Did you make any progress with backtrace in uClibc since this thread?
> 
> Thanks,
> Thomas
> 

Hello,
I'm finally back to work on uClibc. I'm preparing some patches to make
backtrace available for all archs, asking you guys to test on your
platforms.

Thanks,
Carmelo

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to