Home | History | Annotate | Download | only in m_ume
      1 /*--------------------------------------------------------------------*/
      2 /*--- User-mode execve().                               priv_ume.h ---*/
      3 /*--------------------------------------------------------------------*/
      4 
      5 /*
      6    This file is part of Valgrind, a dynamic binary instrumentation
      7    framework.
      8 
      9    Copyright (C) 2000-2012 Julian Seward
     10       jseward (at) acm.org
     11 
     12    This program is free software; you can redistribute it and/or
     13    modify it under the terms of the GNU General Public License as
     14    published by the Free Software Foundation; either version 2 of the
     15    License, or (at your option) any later version.
     16 
     17    This program is distributed in the hope that it will be useful, but
     18    WITHOUT ANY WARRANTY; without even the implied warranty of
     19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20    General Public License for more details.
     21 
     22    You should have received a copy of the GNU General Public License
     23    along with this program; if not, write to the Free Software
     24    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     25    02111-1307, USA.
     26 
     27    The GNU General Public License is contained in the file COPYING.
     28 */
     29 
     30 #if defined(VGO_linux) || defined(VGO_darwin)
     31 
     32 #ifndef __PRIV_UME_H
     33 #define __PRIV_UME_H
     34 
     35 extern int VG_(do_exec_inner)(const HChar *exe, ExeInfo *info);
     36 
     37 #if defined(VGO_linux)
     38 extern Bool VG_(match_ELF) ( Char *hdr, Int len );
     39 extern Int  VG_(load_ELF)  ( Int fd, const HChar *name, ExeInfo *info );
     40 #elif defined(VGO_darwin)
     41 extern Bool VG_(match_macho) ( Char *hdr, Int len );
     42 extern Int  VG_(load_macho)  ( Int fd, const HChar *name, ExeInfo *info );
     43 #else
     44 #  error Unknown OS
     45 #endif
     46 
     47 extern Bool VG_(match_script) ( Char *hdr, Int len );
     48 extern Int  VG_(load_script)  ( Int fd, const HChar *name, ExeInfo *info );
     49 
     50 
     51 #endif // __PRIV_UME_H
     52 
     53 #endif // defined(VGO_linux) || defined(VGO_darwin)
     54 
     55 /*--------------------------------------------------------------------*/
     56 /*--- end                                                          ---*/
     57 /*--------------------------------------------------------------------*/
     58 
     59