Complain about NVidia's libGL.so also when an 0x8C opcode is encountered.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@235 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h
index b730254..4794cd0 100644
--- a/coregrind/vg_include.h
+++ b/coregrind/vg_include.h
@@ -1289,6 +1289,7 @@
/* Called when some unhandleable client behaviour is detected.
Prints a msg and aborts. */
extern void VG_(unimplemented) ( Char* msg );
+extern void VG_(nvidia_moan) ( void );
/* The stack on which Valgrind runs. We can't use the same stack as the
simulatee -- that's an important design decision. */
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 8397698..06b6498 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -1204,7 +1204,7 @@
/* Print some helpful-ish text about unimplemented things, and give
up. */
-extern void VG_(unimplemented) ( Char* msg )
+void VG_(unimplemented) ( Char* msg )
{
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg,
@@ -1231,6 +1231,15 @@
}
+void VG_(nvidia_moan) ( void)
+{
+ VG_(message)(Vg_UserMsg,
+ "The following failure _might_ be caused by linking to NVidia's\n "
+ "libGL.so, so avoiding it, if you can, _might_ help you. For example,\n "
+ "re-build any Qt libraries you are using without OpenGL support.");
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end vg_main.c ---*/
/*--------------------------------------------------------------------*/
diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c
index 9f29229..de1c066 100644
--- a/coregrind/vg_to_ucode.c
+++ b/coregrind/vg_to_ucode.c
@@ -4491,6 +4491,8 @@
default:
VG_(printf)("disInstr: unhandled opcode 0x%x then 0x%x\n",
(UInt)opc, (UInt)getUChar(eip));
+ if (opc == 0x8C)
+ VG_(nvidia_moan)();
VG_(panic)("unhandled x86 opcode");
}
diff --git a/vg_include.h b/vg_include.h
index b730254..4794cd0 100644
--- a/vg_include.h
+++ b/vg_include.h
@@ -1289,6 +1289,7 @@
/* Called when some unhandleable client behaviour is detected.
Prints a msg and aborts. */
extern void VG_(unimplemented) ( Char* msg );
+extern void VG_(nvidia_moan) ( void );
/* The stack on which Valgrind runs. We can't use the same stack as the
simulatee -- that's an important design decision. */
diff --git a/vg_main.c b/vg_main.c
index 8397698..06b6498 100644
--- a/vg_main.c
+++ b/vg_main.c
@@ -1204,7 +1204,7 @@
/* Print some helpful-ish text about unimplemented things, and give
up. */
-extern void VG_(unimplemented) ( Char* msg )
+void VG_(unimplemented) ( Char* msg )
{
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg,
@@ -1231,6 +1231,15 @@
}
+void VG_(nvidia_moan) ( void)
+{
+ VG_(message)(Vg_UserMsg,
+ "The following failure _might_ be caused by linking to NVidia's\n "
+ "libGL.so, so avoiding it, if you can, _might_ help you. For example,\n "
+ "re-build any Qt libraries you are using without OpenGL support.");
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end vg_main.c ---*/
/*--------------------------------------------------------------------*/
diff --git a/vg_syscall_mem.c b/vg_syscall_mem.c
index ea83fbf..d5d5416 100644
--- a/vg_syscall_mem.c
+++ b/vg_syscall_mem.c
@@ -410,11 +410,9 @@
# if defined(__NR_modify_ldt)
case __NR_modify_ldt:
+ VG_(nvidia_moan)();
VG_(unimplemented)
- ("modify_ldt(): I (JRS) haven't investigated this yet; sorry.\n "
- "This might be caused by linking to NVidia's libGL.so, so\n "
- "avoiding it, if you can, _might_ help you. For example,\n "
- "re-build any Qt libraries you are using without OpenGL support.");
+ ("modify_ldt(): I (JRS) haven't investigated this yet; sorry.");
break;
# endif
diff --git a/vg_to_ucode.c b/vg_to_ucode.c
index 9f29229..de1c066 100644
--- a/vg_to_ucode.c
+++ b/vg_to_ucode.c
@@ -4491,6 +4491,8 @@
default:
VG_(printf)("disInstr: unhandled opcode 0x%x then 0x%x\n",
(UInt)opc, (UInt)getUChar(eip));
+ if (opc == 0x8C)
+ VG_(nvidia_moan)();
VG_(panic)("unhandled x86 opcode");
}