From c8792e1e8169f4b243b65116d01df138406fc7f2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 29 Sep 2005 00:35:18 +0000 Subject: [PATCH] Add an explanatory message for when instruction decoding fails. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4817 --- coregrind/m_scheduler/scheduler.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c index 89e2f56e6..1b9ae9432 100644 --- a/coregrind/m_scheduler/scheduler.c +++ b/coregrind/m_scheduler/scheduler.c @@ -780,6 +780,15 @@ VgSchedReturnCode VG_(scheduler) ( ThreadId tid ) } case VEX_TRC_JMP_NODECODE: +#define M(a) VG_(message)(Vg_UserMsg, a); + M("Your program just tried to execute an instruction that Valgrind"); + M("did not recognise. This might be because your program has a bug"); + M("and erroneously jumped to a non-code location. If you are running"); + M("Memcheck, you might have just seen a warning about a bad jump,"); + M("which is a good indication that this is so. Or it might be" ); + M("because the instruction is unimplemented in Valgrind; if you"); + M("think this is the case, or you are not sure, please let us know."); +#undef M VG_(synth_sigill)(tid, VG_(get_IP)(tid)); break;