This is the 2nd installment of the cache info reorganisation.
authorflorian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Sun, 7 Oct 2012 21:59:42 +0000 (21:59 +0000)
committerflorian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Sun, 7 Oct 2012 21:59:42 +0000 (21:59 +0000)
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031 a5019735-40e9-0310-863c-91ae7b9d1cf9

18 files changed:
cachegrind/cg_main.c
callgrind/main.c
coregrind/m_tooliface.c
coregrind/m_translate.c
coregrind/pub_core_tooliface.h
drd/drd_load_store.c
drd/drd_load_store.h
exp-bbv/bbv_main.c
exp-dhat/dh_main.c
exp-sgcheck/h_main.c
exp-sgcheck/h_main.h
helgrind/hg_main.c
include/pub_tool_tooliface.h
lackey/lk_main.c
massif/ms_main.c
memcheck/mc_include.h
memcheck/mc_translate.c
none/nl_main.c

index 24dbc0e9620e64c49eb2d7caad72562db7542b59..487e0420f15619fc5eb113503e219e66310ed663 100644 (file)
@@ -952,6 +952,7 @@ IRSB* cg_instrument ( VgCallbackClosure* closure,
                       IRSB* sbIn, 
                       VexGuestLayout* layout, 
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
    Int        i, isize;
index 080babcbfa49657f0b02df5e9ef98b3891f96b32..c5d472d6a176751cef658af1a37f5e5e5943d8b3 100644 (file)
@@ -909,6 +909,7 @@ IRSB* CLG_(instrument)( VgCallbackClosure* closure,
                        IRSB* sbIn,
                        VexGuestLayout* layout,
                        VexGuestExtents* vge,
+                        VexArchInfo* archinfo_host,
                        IRType gWordTy, IRType hWordTy )
 {
    Int      i;
index be9f1169c822febf75fe4b771281e13af7746815..33ed82fbda2460b9d438e361bee0fb93e7bdbba8 100644 (file)
@@ -41,7 +41,8 @@ VgToolInterface VG_(tdict);
 void VG_(basic_tool_funcs)(
    void(*post_clo_init)(void),
    IRSB*(*instrument)(VgCallbackClosure*, IRSB*, 
-                      VexGuestLayout*, VexGuestExtents*, IRType, IRType),
+                      VexGuestLayout*, VexGuestExtents*, VexArchInfo*,
+                      IRType, IRType),
    void(*fini)(Int)
 )
 {
index ed355db067a57357be4130627a2f5ffd3f602e95..016d93112203884fa7bc729c5e6fbdd59972f13e 100644 (file)
@@ -222,6 +222,7 @@ IRSB* tool_instrument_then_gdbserver_if_needed ( VgCallbackClosure* closureV,
                                                  IRSB*              sb_in, 
                                                  VexGuestLayout*    layout, 
                                                  VexGuestExtents*   vge,
+                                                 VexArchInfo*       vai,
                                                  IRType             gWordTy, 
                                                  IRType             hWordTy )
 {
@@ -230,6 +231,7 @@ IRSB* tool_instrument_then_gdbserver_if_needed ( VgCallbackClosure* closureV,
                                    sb_in,
                                    layout,
                                    vge,
+                                   vai,
                                    gWordTy,
                                    hWordTy),
        layout,
@@ -261,6 +263,7 @@ IRSB* vg_SP_update_pass ( void*             closureV,
                           IRSB*             sb_in, 
                           VexGuestLayout*   layout, 
                           VexGuestExtents*  vge,
+                          VexArchInfo*      vai,
                           IRType            gWordTy, 
                           IRType            hWordTy )
 {
@@ -1505,15 +1508,16 @@ Bool VG_(translate) ( ThreadId tid,
         They are entirely legal but longwinded so as to maximise the
         chance of the C typechecker picking up any type snafus. */
      IRSB*(*f)(VgCallbackClosure*,
-               IRSB*,VexGuestLayout*,VexGuestExtents*,
+               IRSB*,VexGuestLayout*,VexGuestExtents*, VexArchInfo*,
                IRType,IRType)
         = VG_(clo_vgdb) != Vg_VgdbNo
              ? tool_instrument_then_gdbserver_if_needed
              : VG_(tdict).tool_instrument;
      IRSB*(*g)(void*,
-               IRSB*,VexGuestLayout*,VexGuestExtents*,
+               IRSB*,VexGuestLayout*,VexGuestExtents*,VexArchInfo*,
                IRType,IRType)
-       = (IRSB*(*)(void*,IRSB*,VexGuestLayout*,VexGuestExtents*,IRType,IRType))f;
+       = (IRSB*(*)(void*,IRSB*,VexGuestLayout*,VexGuestExtents*,
+                   VexArchInfo*,IRType,IRType))f;
      vta.instrument1     = g;
    }
    /* No need for type kludgery here. */
index 4689db879eb2ccee6872f51aa4e84abb99c10d59..db3d2e4fbd5ffa30fc5ff2a0eb1ef7097736d48d 100644 (file)
@@ -109,7 +109,7 @@ typedef struct {
    IRSB* (*tool_instrument)   (VgCallbackClosure*,
                                IRSB*, 
                                VexGuestLayout*, VexGuestExtents*, 
-                               IRType, IRType);
+                               VexArchInfo*, IRType, IRType);
    void  (*tool_fini)         (Int);
 
    // VG_(needs).core_errors
index 990082046194be8e8f3ddfba68e20566f4e279b7..d5d46ce4677e4ef65ef679b1e9fca28f2a9be83f 100644 (file)
@@ -581,6 +581,7 @@ IRSB* DRD_(instrument)(VgCallbackClosure* const closure,
                        IRSB* const bb_in,
                        VexGuestLayout* const layout,
                        VexGuestExtents* const vge,
+                       VexArchInfo* archinfo_host,
                        IRType const gWordTy,
                        IRType const hWordTy)
 {
index 1d8d008ad1475e269c39bad02da2659b594c351a..4269edd195a44e5b75940e9f7c95f4916a398027 100644 (file)
@@ -43,6 +43,7 @@ IRSB* DRD_(instrument)(VgCallbackClosure* const closure,
                        IRSB* const bb_in,
                        VexGuestLayout* const layout,
                        VexGuestExtents* const vge,
+                       VexArchInfo* const archinfo_host,
                        IRType const gWordTy,
                        IRType const hWordTy);
 void DRD_(trace_mem_access)(const Addr addr, const SizeT size,
index 71fb69e7611775cb0786db213436114fde9d4783..0158fef607b9a2010f7a6a80726b5cafd84e0705 100644 (file)
@@ -347,6 +347,7 @@ static Int get_inst_type(Int len, Addr addr)
 static IRSB* bbv_instrument ( VgCallbackClosure* closure,
                              IRSB* sbIn, VexGuestLayout* layout,
                              VexGuestExtents* vge,
+                             VexArchInfo* archinfo_host,
                              IRType gWordTy, IRType hWordTy )
 {
    Int      i,n_instrs=1;
index c647265aa66aabd616b7e1e17deff12c19c7326d..fcb7d8bb687c62ab34b92ed2dd623b35c1f36319 100644 (file)
@@ -874,6 +874,7 @@ IRSB* dh_instrument ( VgCallbackClosure* closure,
                       IRSB* sbIn,
                       VexGuestLayout* layout,
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
    Int   i, n = 0;
index 83071450cc2f9c530c8a350755c932ae239e8910..ac71d8bf5cb682f3f1a1c86c5ad7040a4cbf715a 100644 (file)
@@ -609,6 +609,7 @@ IRSB* h_instrument ( VgCallbackClosure* closure,
                      IRSB* sbIn,
                      VexGuestLayout* layout,
                      VexGuestExtents* vge,
+                     VexArchInfo* archinfo_host,
                      IRType gWordTy, IRType hWordTy )
 {
    Bool  verboze = 0||False;
index ffed6ed3b5dc99eabbc53990260875e3156b93ff..7572b74f509c5c18a9d6123e38116c05fd3922d8 100644 (file)
@@ -72,6 +72,7 @@ IRSB* h_instrument ( VgCallbackClosure* closure,
                      IRSB* sbIn,
                      VexGuestLayout* layout,
                      VexGuestExtents* vge,
+                     VexArchInfo* archinfo_host,
                      IRType gWordTy, IRType hWordTy );
 
 #endif
index ca9745adbf1bbb2f4e83d3fe5b1d4fa8682124de..ed71596f886bdeed13ec10923100162d6a36989c 100644 (file)
@@ -4326,6 +4326,7 @@ IRSB* hg_instrument ( VgCallbackClosure* closure,
                       IRSB* bbIn,
                       VexGuestLayout* layout,
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
    Int     i;
index a30961c86f9501338d087c0716d90be958418890..245a969bcdf230332fddae52977d01555f113762 100644 (file)
@@ -220,6 +220,7 @@ extern void VG_(basic_tool_funcs)(
                       IRSB*              sb_in, 
                       VexGuestLayout*    layout, 
                       VexGuestExtents*   vge, 
+                      VexArchInfo*       archinfo_host,
                       IRType             gWordTy, 
                       IRType             hWordTy),
 
index 6f4d7d9aa67a41afb604ac13fd84f1b5252572cd..b3eef06a4abdd4c0d8aa2cf85574a174764642ae 100644 (file)
@@ -605,6 +605,7 @@ IRSB* lk_instrument ( VgCallbackClosure* closure,
                       IRSB* sbIn, 
                       VexGuestLayout* layout, 
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
    IRDirty*   di;
index a0ca9e9339a7feb6f9d8edf3368d9bbe928a562a..52df6511baa4268ad3db74a7b9bb2093e65ea6f5 100644 (file)
@@ -2117,6 +2117,7 @@ IRSB* ms_instrument ( VgCallbackClosure* closure,
                       IRSB* sbIn,
                       VexGuestLayout* layout,
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
    if (! have_started_executing_code) {
index abb59db7ee1ad59443fedf98485bedc9f0872503..051d58109b55e3951c717ed3c8495b78cf08734b 100644 (file)
@@ -566,6 +566,7 @@ IRSB* MC_(instrument) ( VgCallbackClosure* closure,
                         IRSB* bb_in, 
                         VexGuestLayout* layout, 
                         VexGuestExtents* vge,
+                        VexArchInfo* archinfo_host,
                         IRType gWordTy, IRType hWordTy );
 
 IRSB* MC_(final_tidy) ( IRSB* );
index 03c25ceb15ec814ed850455dd6afb454a5dcd2e6..1c2f1d4c65dd281d40e5e68fc3c8ab5cf3096a92 100644 (file)
@@ -5302,6 +5302,7 @@ IRSB* MC_(instrument) ( VgCallbackClosure* closure,
                         IRSB* sb_in, 
                         VexGuestLayout* layout, 
                         VexGuestExtents* vge,
+                        VexArchInfo* archinfo_host,
                         IRType gWordTy, IRType hWordTy )
 {
    Bool    verboze = 0||False;
index 19647cdc1c474521ea7de7dc60c92c1760c579c3..69e8e29ac233cb12a0dc0afce75a81f2802120c4 100644 (file)
@@ -40,6 +40,7 @@ IRSB* nl_instrument ( VgCallbackClosure* closure,
                       IRSB* bb,
                       VexGuestLayout* layout, 
                       VexGuestExtents* vge,
+                      VexArchInfo* archinfo_host,
                       IRType gWordTy, IRType hWordTy )
 {
     return bb;