]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Allow --trace-codegen to take 8 bits, and pass to Vex.
authorJulian Seward <jseward@acm.org>
Fri, 29 Oct 2004 00:42:53 +0000 (00:42 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 29 Oct 2004 00:42:53 +0000 (00:42 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@455

VEX/head20041019/coregrind/vg_main.c
VEX/head20041019/coregrind/vg_translate.c

index 11877e8052f10a2bcdd1cde4ef103d79b0fefc1f..0aa22904e35f70d26b7a128d612fd0f9d8126b79 100644 (file)
@@ -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=<XXXXX>   show generated code? (X = 0|1) [00000]\n"
+"    --trace-codegen=<XXXXXXXX>   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");
index 80c1c4160ee3c2aa1f69596463cd6325e54c2e25..26af4a9781be57383d6ef7f69f78c7866948feac 100644 (file)
@@ -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);