Added some reasonably thorough documentation on how to write skins. Also added
an example skin which is referred to in the documentation, and is designed to
be a template which can be copied.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1122 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/example/Makefile.am b/example/Makefile.am
new file mode 100644
index 0000000..3ba7f59
--- /dev/null
+++ b/example/Makefile.am
@@ -0,0 +1,18 @@
+
+SUBDIRS = .
+
+CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
+ -Winline -Wall -Wshadow -O -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -g
+
+valdir = $(libdir)/valgrind
+
+INCLUDES = -I$(top_srcdir)/include
+
+val_PROGRAMS = vgskin_example.so
+
+vgskin_example_so_SOURCES = ex_main.c
+vgskin_example_so_LDFLAGS = -shared
+
+##vgskin_example.so$(EXEEXT): $(vgskin_example_so_OBJECTS)
+## $(CC) $(CFLAGS) $(LDFLAGS) -shared -o vgskin_example.so \
+## $(vgskin_example_so_OBJECTS)
diff --git a/example/ex_main.c b/example/ex_main.c
new file mode 100644
index 0000000..a9d51fd
--- /dev/null
+++ b/example/ex_main.c
@@ -0,0 +1,29 @@
+
+/*--------------------------------------------------------------------*/
+/*--- An example skin. ex_main.c ---*/
+/*--------------------------------------------------------------------*/
+
+#include "vg_skin.h"
+
+void SK_(pre_clo_init)(VgNeeds* needs, VgTrackEvents* track)
+{
+ needs->name = "example";
+ needs->description = "an example Valgrind skin";
+}
+
+void SK_(post_clo_init)(void)
+{
+}
+
+UCodeBlock* SK_(instrument)(UCodeBlock* cb, Addr a)
+{
+ return cb;
+}
+
+void SK_(fini)(void)
+{
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ex_main.c ---*/
+/*--------------------------------------------------------------------*/