diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | liberror-backtrace.7 | 60 |
2 files changed, 66 insertions, 0 deletions
@@ -20,6 +20,9 @@ OBJ =\ print_backtrace.o\ save_backtrace.o +MAN7 =\ + liberror-backtrace.7 + LOBJ = $(OBJ:.o=.lo) @@ -44,15 +47,18 @@ liberror-backtrace.$(LIBEXT): $(LOBJ) install: liberror-backtrace.a liberror-backtrace.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/liberror-backtrace" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man7" cp -- liberror-backtrace.a "$(DESTDIR)$(PREFIX)/lib" cp -- liberror-backtrace.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/liberror-backtrace.$(LIBMINOREXT)" ln -sf -- liberror-backtrace.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/liberror-backtrace.$(LIBMAJOREXT)" ln -sf -- liberror-backtrace.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/liberror-backtrace.$(LIBEXT)" cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/liberror-backtrace" + cp -- $(MAN7) "$(DESTDIR)$(MANPREFIX)/man7" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/lib/liberror-backtrace."* -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/liberror-backtrace" + -cd -- "$(DESTDIR)$(MANPREFIX)/man7" && rm -f -- $(MAN7) clean: -rm -f -- *.o *.lo *.a *.so *.so.* *.su *.test diff --git a/liberror-backtrace.7 b/liberror-backtrace.7 new file mode 100644 index 0000000..af489cf --- /dev/null +++ b/liberror-backtrace.7 @@ -0,0 +1,60 @@ +.TH LIBERROR-BACKTRACE 7 2019-04-14 liberror +.SH NAME +liberror-backtrace \- implementation of backtrace for liberror +.SH DESCRIPTION +The +.B liberror-backtrace +library implements the backtrace functionality for the +.B liberror +library. Specifically, it replaces the implementations of the +.BR liberror_save_backtrace (3) +and +.BR liberror_print_backtrace (3) +functions with implementations that actually save and print +the backtrace. There is no header files associated with the +.B liberror-backtrace +library it is simply used by linking. If +.B liberror +is dynamically linked, +.B liberror-backtrace shall +be linked with +.I -lerror-backtrace -ldw -lunwind +and +.I -lerror-backtrace +shall be specified before +.IR -lerror . +If +.B liberror +is statically linked, +.B liberror-backtrace shall +be linked with +.I -Wl,--whole-archive -lerror-backtrace -Wl,--no-whole-archive -ldw -lunwind +and it does not matter where whether +.I -lerror-backtrace +is specified before or after +.IR -lerror . +Thus, a library using +.I -lerror +can always be linked with +.I -Wl,--whole-archive -lerror-backtrace -Wl,--no-whole-archive -ldw -lunwind -lerror +for +.B liberror +with backtrace support. Alternatively, if +.B liberror +is dynamically linked, +.B liberror-backtrace +can be preloaded with the +.I LD_PRELOAD +environment variable. +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH SEE ALSO +.BR liberror (7) |