From: Julian Seward Date: Mon, 25 Oct 2004 13:06:17 +0000 (+0000) Subject: Track vex controllability changes, and other hacks-de-jour. X-Git-Tag: svn/VALGRIND_3_0_1^2~912 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e79d9c70d0dda46e1bc84a39bb2e7c9d61215d56;p=thirdparty%2Fvalgrind.git Track vex controllability changes, and other hacks-de-jour. git-svn-id: svn://svn.valgrind.org/vex/trunk@422 --- diff --git a/VEX/test_main.c b/VEX/test_main.c index 0bf552a377..3d5c5d9da5 100644 --- a/VEX/test_main.c +++ b/VEX/test_main.c @@ -52,6 +52,7 @@ int main ( int argc, char** argv ) Int bb_number; Int orig_nbytes, trans_used, orig_used; TranslateResult tres; + VexControl vcon; if (argc != 2) { fprintf(stderr, "usage: vex file.org\n"); @@ -63,12 +64,18 @@ int main ( int argc, char** argv ) exit(1); } + /* Run with default params. However, we can't allow bb chasing + since that causes the front end to get segfaults when it tries + to read code outside the initial BB we hand it. */ + LibVEX_default_VexControl ( &vcon ); + vcon.guest_chase_thresh = 0; + LibVEX_Init ( &failure_exit, &log_bytes, 1, /* debug_paranoia */ 0, /* verbosity */ - False, - //True, /* valgrind support */ - 50 /*100*/ /* max insns per bb */); + //False, + True, /* valgrind support */ + &vcon ); #if 0 {extern void test_asm86(void); @@ -102,9 +109,9 @@ int main ( int argc, char** argv ) origbuf[i] = (UChar)u; } - if (bb_number == 1000) break; + if (bb_number == 10000) break; { - for (i = 0; i < 100; i++) + for (i = 0; i < 1; i++) tres = LibVEX_Translate ( InsnSetX86, InsnSetX86, origbuf, (Addr64)orig_addr, &orig_used,