Apache OpenOffice (AOO) Bugzilla – Issue 16225
sal/osl/unx/backtrace.c for IRIX
Last modified: 2010-03-29 20:43:52 UTC
IRIX needs some code in sal/osl/unx/backtrace.c for the crash reporter. I have some code, just need to tidy it up a little and I'll post it.
set target milestone.
Created attachment 7396 [details] sal/osl/unx/backtrace.c - add IRIX bits for backtracing
One problem with this patch is due to a dodgy gcc on IRIX. Using a sample program, which calls a few functions (to make things interesting) and then aborts, I get the following results: % /usr/local/gcc-2.95.3/bin/gcc -v Reading specs from /usr/local/gcc-2.95.3/lib/gcc-lib/mips-sgi-irix6.5/2.95.3/specs gcc version 2.95.3 20010315 (release) % /usr/local/gcc-2.95.3/bin/gcc -o stacktrace stack.c test_stacktrace.c -lexc % ./stacktrace __exc_unwind: Error: pc(0x100013d8) not in any .debug_frame table 0x000000000001 <unknown function> % /usr/local/gcc-2.95.3/bin/gcc -g -o stacktrace stack.c test_stacktrace.c -lexc % ./stacktrace 0x0000100014bc backtrace 0x000010001504 cfunc 0x00001000154c bfunc 0x00001000159c afunc 0x000010001290 main % gcc -v Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0.4/specs Configured with: ../configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --disable-shared --enable-threads --enable-haifa Thread model: single gcc version 3.0.4 % gcc -o stacktrace stack.c test_stacktrace.c -lexc % ./stacktrace __exc_unwind: Error: pc(0x10001498) not in any .debug_frame table % gcc -g -o stacktrace stack.c test_stacktrace.c -lexc % ./stacktrace 0x000010001578 backtrace 0x0000100015c0 cfunc 0x000010001608 bfunc 0x000010001658 afunc 0x000010001320 main % cc -version MIPSpro Compilers: Version 7.3.1.2m % cc -o stacktrace stack.c test_stacktrace.c -lexc stack.c: test_stacktrace.c: % ./stacktrace 0x000010000f94 backtrace 0x000010000fd4 cfunc 0x000010001014 bfunc 0x00001000105c afunc 0x000010000e50 main % cc -g -o stacktrace stack.c test_stacktrace.c -lexc stack.c: test_stacktrace.c: % ./stacktrace 0x000010000fb4 backtrace 0x000010000ff4 cfunc 0x000010001034 bfunc 0x00001000107c afunc 0x000010000e70 main % cc -Ofast -o stacktrace stack.c test_stacktrace.c -lexc stack.c: test_stacktrace.c: % ./stacktrace 0x000010001688 backtrace 0x0000100010e0 main
Created attachment 7397 [details] same as above, without using printing the final (invalid) frame
Whoops, forgot to say, gcc on IRIX does not support -rdynamic, which presumably would help get the symbols even without -g.
Created attachment 7568 [details] sal/osl/unx/backtrace.c - with appropriate headers
Created attachment 7570 [details] sal/util/makefile - link in extra bits for IRIX backtrace
the back trace code compiles and links now... :-)
committed to ooo11rc2.
verified.
close issue.
We have code in backtrace.c for IRIX, so we should compile it sal/osl/unx/makefile.mk: .IF "$(OS)"=="SOLARIS" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)$(CPU)"=="LINUXS" SLOFILES += $(SLO)$/backtrace.obj OBJFILES += $(OBJ)$/backtrace.obj .ENDIF
per issue 106845 sb removed the partial irix port, so this doesn't make sense in isolation anymore106845
closing