|
From: <sv...@va...> - 2014-09-24 12:00:58
|
Author: florian
Date: Wed Sep 24 12:00:49 2014
New Revision: 2958
Log:
Constification part 3.
Constify parameters of instrumentation functions and callbacks from
VexTranslateArgs.
Modified:
trunk/priv/guest_generic_bb_to_IR.c
trunk/priv/guest_generic_bb_to_IR.h
trunk/pub/libvex.h
trunk/switchback/switchback.c
Modified: trunk/priv/guest_generic_bb_to_IR.c
==============================================================================
--- trunk/priv/guest_generic_bb_to_IR.c (original)
+++ trunk/priv/guest_generic_bb_to_IR.c Wed Sep 24 12:00:49 2014
@@ -192,7 +192,7 @@
/*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,
Modified: trunk/priv/guest_generic_bb_to_IR.h
==============================================================================
--- trunk/priv/guest_generic_bb_to_IR.h (original)
+++ trunk/priv/guest_generic_bb_to_IR.h Wed Sep 24 12:00:49 2014
@@ -182,7 +182,7 @@
/*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,
Modified: trunk/pub/libvex.h
==============================================================================
--- trunk/pub/libvex.h (original)
+++ trunk/pub/libvex.h Wed Sep 24 12:00:49 2014
@@ -666,15 +666,15 @@
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 @@
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
Modified: trunk/switchback/switchback.c
==============================================================================
--- trunk/switchback/switchback.c (original)
+++ trunk/switchback/switchback.c Wed Sep 24 12:00:49 2014
@@ -110,7 +110,7 @@
return False;
}
-static UInt needs_self_check ( void* opaque, VexGuestExtents* vge ) {
+static UInt needs_self_check ( void* opaque, const VexGuestExtents* vge ) {
return 0;
}
|