From: Julian Seward Date: Wed, 8 May 2002 01:58:18 +0000 (+0000) Subject: Complain about NVidia's libGL.so also when an 0x8C opcode is encountered. X-Git-Tag: svn/VALGRIND_1_0_3~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bcb60e01a26c1879955254f86174be0e6252827;p=thirdparty%2Fvalgrind.git Complain about NVidia's libGL.so also when an 0x8C opcode is encountered. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@235 --- diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h index b730254956..4794cd0dc5 100644 --- a/coregrind/vg_include.h +++ b/coregrind/vg_include.h @@ -1289,6 +1289,7 @@ extern void VG_(copy_m_state_static_to_baseBlock) ( void ); /* 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 8397698bca..06b649814f 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -1204,7 +1204,7 @@ extern void VG_(start_GDB_whilst_on_client_stack) ( void ) /* 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 @@ extern void VG_(unimplemented) ( Char* msg ) } +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 9f29229c67..de1c066ad2 100644 --- a/coregrind/vg_to_ucode.c +++ b/coregrind/vg_to_ucode.c @@ -4491,6 +4491,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) 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 b730254956..4794cd0dc5 100644 --- a/vg_include.h +++ b/vg_include.h @@ -1289,6 +1289,7 @@ extern void VG_(copy_m_state_static_to_baseBlock) ( void ); /* 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 8397698bca..06b649814f 100644 --- a/vg_main.c +++ b/vg_main.c @@ -1204,7 +1204,7 @@ extern void VG_(start_GDB_whilst_on_client_stack) ( void ) /* 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 @@ extern void VG_(unimplemented) ( Char* msg ) } +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 ea83fbf919..d5d5416522 100644 --- a/vg_syscall_mem.c +++ b/vg_syscall_mem.c @@ -410,11 +410,9 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid ) # 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 9f29229c67..de1c066ad2 100644 --- a/vg_to_ucode.c +++ b/vg_to_ucode.c @@ -4491,6 +4491,8 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd ) 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"); }