This change does two things: one is the implementation of
VG_(synth_fault_*), which synthesize faults as if an instruction had
caused a CPU fault.  This is used in two places: one in vg_translate.c,
when trying to fetch instructions from bad memory, and the other in
vg_ldt.c, when using a bad segment register.  This fixes a bug where an
assertion would fail rather than getting a useful message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2324 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h
index b77de08..3e807b8 100644
--- a/coregrind/vg_include.h
+++ b/coregrind/vg_include.h
@@ -1080,6 +1080,14 @@
 
 extern void VG_(kill_self)(Int sigNo);
 
+/* These function synthesize a fault, as if the running instruction
+   had had a fault.  These functions do not return - they longjmp back
+   into the scheduler so the signal can be delivered. */
+extern void VG_(synth_fault)        (ThreadId tid);
+extern void VG_(synth_fault_mapping)(ThreadId tid, Addr addr);
+extern void VG_(synth_fault_perms)  (ThreadId tid, Addr addr);
+
+
 /* ---------------------------------------------------------------------
    Exports of vg_mylibc.c
    ------------------------------------------------------------------ */