On 2/23/2011 6:03 AM, ANDY KENNEDY 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.
> 

no, the linker script libc.so does the work.

> FYI: I get no linker errors, and no warnings.
> 
> Please advise.
> 
> Andy
> 
> 

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

Reply via email to