Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2008 19:23:48 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152290 for review
Message-ID:  <200810311923.m9VJNmDK095653@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152290

Change 152290 by peter@peter_overcee on 2008/10/31 19:23:33

	Patch up a few warnings.  Will probably cause whiplash on i386.

Affected files ...

.. //depot/projects/valgrind/coregrind/m_sigframe/sigframe-amd64-freebsd.c#3 edit
.. //depot/projects/valgrind/coregrind/m_signals.c#7 edit
.. //depot/projects/valgrind/coregrind/m_syscall.c#9 edit
.. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-amd64-freebsd.c#5 edit
.. //depot/projects/valgrind/include/vki/vki-freebsd.h#9 edit

Differences ...

==== //depot/projects/valgrind/coregrind/m_sigframe/sigframe-amd64-freebsd.c#3 (text+ko) ====

@@ -389,14 +389,14 @@
    if (VG_(extend_stack)(addr, tst->client_stack_szB)) {
       stackseg = VG_(am_find_nsegment)(addr);
       if (0 && stackseg)
-	 VG_(printf)("frame=%p seg=%p-%p\n",
+	 VG_(printf)("frame=%#lx seg=%#lx-%#lx\n",
 		     addr, stackseg->start, stackseg->end);
    }
 
    if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) {
       VG_(message)(
          Vg_UserMsg,
-         "Can't extend stack to %p during signal delivery for thread %d:",
+         "Can't extend stack to %#lx during signal delivery for thread %d:",
          addr, tid);
       if (stackseg == NULL)
          VG_(message)(Vg_UserMsg, "  no stack segment");
@@ -523,8 +523,8 @@
       caller to do. */
 
    if (0)
-      VG_(printf)("pushed signal frame; %%RSP now = %p, "
-                  "next %%RIP = %p, status=%d\n", 
+      VG_(printf)("pushed signal frame; %%RSP now = %#lx, "
+                  "next %%RIP = %#llx, status=%d\n", 
 		  rsp, tst->arch.vex.guest_RIP, tst->status);
 }
 
@@ -641,7 +641,7 @@
    if (VG_(clo_trace_signals))
       VG_(message)(
          Vg_DebugMsg, 
-         "VG_(signal_return) (thread %d): isRT=%d valid magic; RIP=%p", 
+         "VG_(signal_return) (thread %d): isRT=%d valid magic; RIP=%#llx", 
          tid, isRT, tst->arch.vex.guest_RIP);
 
    /* tell the tools */

==== //depot/projects/valgrind/coregrind/m_signals.c#7 (text+ko) ====

@@ -1537,6 +1537,7 @@
    deliver_signal(tid, &info, &uc);
 }
 
+#ifndef VGO_freebsd
 /* Make a signal pending for a thread, for later delivery.
    VG_(poll_signals) will arrange for it to be delivered at the right
    time. 
@@ -1582,6 +1583,7 @@
 
    restore_all_host_signals(&savedmask);
 }
+#endif
 
 /*
    Returns the next queued signal for thread tid which is in "set".
@@ -1866,7 +1868,7 @@
 
    if (VG_(clo_trace_signals)) {
       VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d, "
-                                "EIP=%#lx, eip=%#x addr=%#lx",
+                                "EIP=%#lx, eip=%#lx addr=%#lx",
                    sigNo, info->si_code, VG_(get_IP)(tid), 
 		   VG_UCONTEXT_INSTR_PTR(uc), (Addr)info->si_addr );
    }
@@ -1974,7 +1976,7 @@
 		   sigNo, signame(sigNo));
 
       VG_(message)(Vg_DebugMsg, 
-		   "si_code=%x;  Faulting address: %p;  sp: %#x",
+		   "si_code=%x;  Faulting address: %p;  sp: %#lx",
 		   info->si_code, info->VKI_SIGINFO_si_addr,
                    VG_UCONTEXT_STACK_PTR(uc));
 

==== //depot/projects/valgrind/coregrind/m_syscall.c#9 (text+ko) ====

@@ -600,8 +600,8 @@
   ULong val = do_syscall_WRK(sysno,a1,a2,a3,a4,a5,a6,a7,a8,&flags,rv2);
   return VG_(mk_SysRes_x86_freebsd)( (UInt)val, (UInt)(val>>32), flags );
 #elif defined(VGP_amd64_freebsd)
-  ULong val2 = -10;
-  ULong val = do_syscall_WRK(sysno,a1,a2,a3,a4,a5,a6,a7,a8,&flags,&val2);
+  UWord val2 = -10;
+  UWord val = do_syscall_WRK(sysno,a1,a2,a3,a4,a5,a6,a7,a8,&flags,&val2);
   return VG_(mk_SysRes_amd64_freebsd)( val, val2, flags );
 #else
 #   error Unknown platform

==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-amd64-freebsd.c#5 (text+ko) ====

@@ -369,9 +369,9 @@
       /* On FreeBSD, the syscall loads the %gs selector for us, so do it now. */
       tst = VG_(get_ThreadState)(tid);
       p = (void**)ARG2;
-      tst->arch.vex.guest_FS_ZERO = *p;
+      tst->arch.vex.guest_FS_ZERO = (UWord)*p;
       /* "do" the syscall ourselves; the kernel never sees it */
-      SET_STATUS_Success2(*p, tst->arch.vex.guest_RDX );
+      SET_STATUS_Success2((ULong)*p, tst->arch.vex.guest_RDX );
 
       break;
    case VKI_AMD64_GET_FSBASE:
@@ -380,6 +380,7 @@
       PRE_MEM_WRITE( "amd64_get_fsbase(basep)", ARG2, sizeof(void *) );
 
       /* "do" the syscall ourselves; the kernel never sees it */
+      tst = VG_(get_ThreadState)(tid);
       SET_STATUS_Success2( tst->arch.vex.guest_FS_ZERO, tst->arch.vex.guest_RDX );
       POST_MEM_WRITE( ARG2, sizeof(void *) );
       break;

==== //depot/projects/valgrind/include/vki/vki-freebsd.h#9 (text+ko) ====

@@ -520,7 +520,9 @@
 	vki_sigval_t sigev_value;       /* Signal value */
 };
 #define sigev_signo             __sigev_u.__sigev_signo
+#if 0
 #define sigev_notify_kqueue     __sigev_u.__sigev_notify_kqueue
+#endif
 
 //----------------------------------------------------------------------
 // From sys/_iovec.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810311923.m9VJNmDK095653>