From 789b7ddb391410c4d2c1d2eb2a1909faca2e340e Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 24 Sep 2014 12:00:49 +0000 Subject: [PATCH] Constification part 3. Constify parameters of instrumentation functions and callbacks from VexTranslateArgs. git-svn-id: svn://svn.valgrind.org/vex/trunk@2958 --- VEX/priv/guest_generic_bb_to_IR.c | 2 +- VEX/priv/guest_generic_bb_to_IR.h | 2 +- VEX/pub/libvex.h | 14 +++++++------- VEX/switchback/switchback.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/VEX/priv/guest_generic_bb_to_IR.c b/VEX/priv/guest_generic_bb_to_IR.c index 63e6a2afbc..76d0d43b25 100644 --- a/VEX/priv/guest_generic_bb_to_IR.c +++ b/VEX/priv/guest_generic_bb_to_IR.c @@ -192,7 +192,7 @@ IRSB* bb_to_IR ( /*IN*/ VexArchInfo* archinfo_guest, /*IN*/ VexAbiInfo* abiinfo_both, /*IN*/ IRType guest_word_type, - /*IN*/ UInt (*needs_self_check)(void*,VexGuestExtents*), + /*IN*/ UInt (*needs_self_check)(void*,const VexGuestExtents*), /*IN*/ Bool (*preamble_function)(void*,IRSB*), /*IN*/ Int offB_GUEST_CMSTART, /*IN*/ Int offB_GUEST_CMLEN, diff --git a/VEX/priv/guest_generic_bb_to_IR.h b/VEX/priv/guest_generic_bb_to_IR.h index 5a7f016f9b..e06bd27f16 100644 --- a/VEX/priv/guest_generic_bb_to_IR.h +++ b/VEX/priv/guest_generic_bb_to_IR.h @@ -182,7 +182,7 @@ IRSB* bb_to_IR ( /*IN*/ VexArchInfo* archinfo_guest, /*IN*/ VexAbiInfo* abiinfo_both, /*IN*/ IRType guest_word_type, - /*IN*/ UInt (*needs_self_check)(void*,VexGuestExtents*), + /*IN*/ UInt (*needs_self_check)(void*,const VexGuestExtents*), /*IN*/ Bool (*preamble_function)(void*,IRSB*), /*IN*/ Int offB_GUEST_CMSTART, /*IN*/ Int offB_GUEST_CMLEN, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 5700ba6d5e..b1f18076be 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -666,15 +666,15 @@ typedef NULL. */ IRSB* (*instrument1) ( /*callback_opaque*/void*, IRSB*, - VexGuestLayout*, - VexGuestExtents*, - VexArchInfo*, + const VexGuestLayout*, + const VexGuestExtents*, + const VexArchInfo*, IRType gWordTy, IRType hWordTy ); IRSB* (*instrument2) ( /*callback_opaque*/void*, IRSB*, - VexGuestLayout*, - VexGuestExtents*, - VexArchInfo*, + const VexGuestLayout*, + const VexGuestExtents*, + const VexArchInfo*, IRType gWordTy, IRType hWordTy ); IRSB* (*finaltidy) ( IRSB* ); @@ -685,7 +685,7 @@ typedef that the i'th extent needs a check. Since there can be at most 3 extents, the returned values must be between 0 and 7. */ UInt (*needs_self_check)( /*callback_opaque*/void*, - VexGuestExtents* ); + const VexGuestExtents* ); /* IN: optionally, a callback which allows the caller to add its own IR preamble following the self-check and any other diff --git a/VEX/switchback/switchback.c b/VEX/switchback/switchback.c index 1fa932c191..48f3d1fa1d 100644 --- a/VEX/switchback/switchback.c +++ b/VEX/switchback/switchback.c @@ -110,7 +110,7 @@ static Bool chase_into_ok ( void* opaque, Addr64 dst ) { return False; } -static UInt needs_self_check ( void* opaque, VexGuestExtents* vge ) { +static UInt needs_self_check ( void* opaque, const VexGuestExtents* vge ) { return 0; } -- 2.47.2