From: Julian Seward Date: Fri, 29 Oct 2004 00:42:53 +0000 (+0000) Subject: Allow --trace-codegen to take 8 bits, and pass to Vex. X-Git-Tag: svn/VALGRIND_3_0_1^2~879 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=049d36769c3be01fc9789a4f283ca494b126ed04;p=thirdparty%2Fvalgrind.git Allow --trace-codegen to take 8 bits, and pass to Vex. git-svn-id: svn://svn.valgrind.org/vex/trunk@455 --- diff --git a/VEX/head20041019/coregrind/vg_main.c b/VEX/head20041019/coregrind/vg_main.c index 11877e8052..0aa22904e3 100644 --- a/VEX/head20041019/coregrind/vg_main.c +++ b/VEX/head20041019/coregrind/vg_main.c @@ -1570,7 +1570,7 @@ void usage ( Bool debug_help ) " --profile=no|yes profile? (tool must be built for it) [no]\n" " --chain-bb=no|yes do basic-block chaining? [yes]\n" " --branchpred=yes|no generate branch prediction hints [no]\n" -" --trace-codegen= show generated code? (X = 0|1) [00000]\n" +" --trace-codegen= show generated code? (X = 0|1) [00000000]\n" " --trace-syscalls=no|yes show all system calls? [no]\n" " --trace-signals=no|yes show signal handling details? [no]\n" " --trace-symtab=no|yes show symbol table details? [no]\n" @@ -1764,7 +1764,7 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) else VG_NUM_CLO ("--dump-error", VG_(clo_dump_error)) else VG_NUM_CLO ("--input-fd", VG_(clo_input_fd)) else VG_NUM_CLO ("--sanity-level", VG_(clo_sanity_level)) - else VG_NUM_CLO ("--signal­polltime", VG_(clo_signal_polltime)) + else VG_NUM_CLO ("--signal-polltime", VG_(clo_signal_polltime)) else VG_BNUM_CLO("--num-callers", VG_(clo_backtrace_size), 1, VG_DEEPEST_BACKTRACE) @@ -1829,14 +1829,14 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) Int j; char* opt = & arg[16]; - if (5 != VG_(strlen)(opt)) { + if (8 != VG_(strlen)(opt)) { VG_(message)(Vg_UserMsg, - "--trace-codegen argument must have 5 digits"); + "--trace-codegen argument must have 8 digits"); VG_(bad_option)(arg); } - for (j = 0; j < 5; j++) { + for (j = 0; j < 8; j++) { if ('0' == opt[j]) { /* do nothing */ } - else if ('1' == opt[j]) VG_(clo_trace_codegen) |= (1 << j); + else if ('1' == opt[j]) VG_(clo_trace_codegen) |= (1 << (7-j)); else { VG_(message)(Vg_UserMsg, "--trace-codegen argument can only " "contain 0s and 1s"); diff --git a/VEX/head20041019/coregrind/vg_translate.c b/VEX/head20041019/coregrind/vg_translate.c index 80c1c4160e..26af4a9781 100644 --- a/VEX/head20041019/coregrind/vg_translate.c +++ b/VEX/head20041019/coregrind/vg_translate.c @@ -1486,7 +1486,6 @@ Bool VG_(translate) ( ThreadId tid, Addr orig_addr, if (!vex_init_done) { LibVEX_Init ( &failure_exit, &log_bytes, 1, /* debug_paranoia */ - 0, /* verbosity */ False, /* valgrind support */ &VG_(clo_vex_control) ); vex_init_done = True; @@ -1570,7 +1569,7 @@ Bool VG_(translate) ( ThreadId tid, Addr orig_addr, : NULL, hacky_findhelper, /* SK_(tool_findhelper), */ NULL, - 0+ DECIDE_IF_PRINTING_CODEGEN ? 2 : 0 + VG_(clo_trace_codegen) ); vg_assert(tres == TransOK);