Hi,

On Fri, 2009-06-05 at 11:08 +0530, Madhan Sadasivam wrote:
> Hello,
> 
> The code below helps to find if we are running on Xen VM and uses
> "ud2a"
> http://xen-3.1.sourcearchive.com/documentation/3.1.0/xen-detect_8c-source.html
> 
> and as expected Valgrind 3.4.1 throws the following warning:

I ran into the same problem. What I ended up doing was along the lines
of:

#ifndef NDEBUG
#include <valgrind/valgrind.h>
#else
#define RUNNING_ON_VALGRIND 0
#endif

main()
{
   .....
   if (RUNNING_ON_VALGRIND)
     signal(SIGILL, dummy_valgrind_handler)
   else
     signal(SIGILL, normal_sigill_handler)

Of course that's just a quick example, you probably want to use
sigaction(). I know its an ugly hack, but it works. I could not figure
out how to suppress that either.

Cheers,
--Tim




------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to