Home | History | Annotate | Download | only in pub
      1 
      2 /*---------------------------------------------------------------*/
      3 /*--- begin                               libvex_trc_values.h ---*/
      4 /*---------------------------------------------------------------*/
      5 
      6 /*
      7    This file is part of Valgrind, a dynamic binary instrumentation
      8    framework.
      9 
     10    Copyright (C) 2004-2012 OpenWorks LLP
     11       info (at) open-works.net
     12 
     13    This program is free software; you can redistribute it and/or
     14    modify it under the terms of the GNU General Public License as
     15    published by the Free Software Foundation; either version 2 of the
     16    License, or (at your option) any later version.
     17 
     18    This program is distributed in the hope that it will be useful, but
     19    WITHOUT ANY WARRANTY; without even the implied warranty of
     20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     21    General Public License for more details.
     22 
     23    You should have received a copy of the GNU General Public License
     24    along with this program; if not, write to the Free Software
     25    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     26    02110-1301, USA.
     27 
     28    The GNU General Public License is contained in the file COPYING.
     29 
     30    Neither the names of the U.S. Department of Energy nor the
     31    University of California nor the names of its contributors may be
     32    used to endorse or promote products derived from this software
     33    without prior written permission.
     34 */
     35 
     36 #ifndef __LIBVEX_TRC_VALUES_H
     37 #define __LIBVEX_TRC_VALUES_H
     38 
     39 
     40 /* Magic values that the guest state pointer might be set to when
     41    returning to the dispatcher.  The only other legitimate value is to
     42    point to the start of the thread's VEX guest state.
     43 
     44    This file may get included in assembly code, so do not put
     45    C-specific constructs in it.
     46 
     47    These values should be 61 or above so as not to conflict
     48    with Valgrind's VG_TRC_ values, which are 60 or below.
     49 
     50    These values *must* be odd (have bit 0 set) because the dispatchers
     51    (coregrind/m_dispatch/dispatch-*-*.S) use this fact to distinguish
     52    a TRC value from the unchanged baseblock pointer -- which has 0 as
     53    its lowest bit.
     54 */
     55 
     56 #define VEX_TRC_JMP_TINVAL     61  /* invalidate translations before
     57                                       continuing */
     58 #define VEX_TRC_JMP_NOREDIR    81  /* jump to undirected guest addr */
     59 #define VEX_TRC_JMP_SIGTRAP    85  /* deliver trap (SIGTRAP) before
     60                                       continuing */
     61 #define VEX_TRC_JMP_SIGSEGV    87  /* deliver segv (SIGSEGV) before
     62                                       continuing */
     63 #define VEX_TRC_JMP_SIGBUS     93  /* deliver SIGBUS before continuing */
     64 
     65 #define VEX_TRC_JMP_EMWARN     63  /* deliver emulation warning before
     66                                       continuing */
     67 #define VEX_TRC_JMP_EMFAIL     83  /* emulation fatal error; abort system */
     68 
     69 #define VEX_TRC_JMP_CLIENTREQ  65  /* do a client req before continuing */
     70 #define VEX_TRC_JMP_YIELD      67  /* yield to thread sched
     71                                       before continuing */
     72 #define VEX_TRC_JMP_NODECODE   69  /* next instruction is not decodable */
     73 #define VEX_TRC_JMP_MAPFAIL    71  /* address translation failed */
     74 
     75 #define VEX_TRC_JMP_SYS_SYSCALL  73 /* do syscall before continuing */
     76 #define VEX_TRC_JMP_SYS_INT32    75 /* do syscall before continuing */
     77 #define VEX_TRC_JMP_SYS_INT128   77 /* do syscall before continuing */
     78 #define VEX_TRC_JMP_SYS_INT129   89 /* do syscall before continuing */
     79 #define VEX_TRC_JMP_SYS_INT130   91 /* do syscall before continuing */
     80 
     81 #define VEX_TRC_JMP_SYS_SYSENTER 79 /* do syscall before continuing */
     82 
     83 #define VEX_TRC_JMP_BORING       95 /* return to sched, but just
     84                                        keep going; no special action */
     85 
     86 #endif /* ndef __LIBVEX_TRC_VALUES_H */
     87 
     88 /*---------------------------------------------------------------*/
     89 /*---                                     libvex_trc_values.h ---*/
     90 /*---------------------------------------------------------------*/
     91