Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 06:50:02 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151784 for review
Message-ID:  <200810230650.m9N6o2gu060199@repoman.freebsd.org>

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

Change 151784 by peter@peter_cheese on 2008/10/23 06:49:08

	Checkpoint more compile fixes.

Affected files ...

.. //depot/projects/valgrind/coregrind/m_debuginfo/d3basics.c#2 edit
.. //depot/projects/valgrind/coregrind/m_machine.c#4 edit
.. //depot/projects/valgrind/coregrind/m_main.c#5 edit
.. //depot/projects/valgrind/coregrind/m_signals.c#4 edit
.. //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#5 edit
.. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#6 edit
.. //depot/projects/valgrind/coregrind/m_trampoline.S#4 edit
.. //depot/projects/valgrind/coregrind/pub_core_initimg.h#2 edit

Differences ...

==== //depot/projects/valgrind/coregrind/m_debuginfo/d3basics.c#2 (text+ko) ====

@@ -378,10 +378,10 @@
 static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
 {
    vg_assert(regs);
-#  if defined(VGP_amd64_linux)
+#  if defined(VGP_amd64_linux) || defined(VGP_amd64_freebsd)
    if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
    if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
-#  elif defined(VGP_x86_linux)
+#  elif defined(VGP_x86_linux) || defined(VGP_x86_freebsd)
    if (regno == 5/*EBP*/) { *a = regs->fp; return True; }
    if (regno == 4/*ESP*/) { *a = regs->sp; return True; }
 #  elif defined(VGP_ppc32_linux)

==== //depot/projects/valgrind/coregrind/m_machine.c#4 (text+ko) ====

@@ -100,6 +100,10 @@
    VG_(threads)[tid].arch.vex_shadow2.guest_GPR3 = s2res;
    VG_(threads)[tid].arch.vex_shadow1.guest_GPR4 = s1err;
    VG_(threads)[tid].arch.vex_shadow2.guest_GPR4 = s2err;
+#  elif defined(VGP_x86_freebsd)
+   VG_(threads)[tid].arch.vex_shadow1.guest_EAX = s1res;
+   VG_(threads)[tid].arch.vex_shadow2.guest_EAX = s2res;
+   /* QQQ: this is very incomplete.  EDX and EFL are affected */
 #  else
 #    error "Unknown plat"
 #  endif

==== //depot/projects/valgrind/coregrind/m_main.c#5 (text+ko) ====

@@ -1528,7 +1528,7 @@
    if (!need_help) {
       VG_(debugLog)(1, "main", "Create initial image\n");
 
-#     if defined(VGO_linux)
+#     if defined(VGO_linux) || defined(VGO_freebsd)
       the_iicii.argv              = argv;
       the_iicii.envp              = envp;
       the_iicii.toolname          = toolname;

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

@@ -1977,7 +1977,6 @@
 		   "si_code=%x;  Faulting address: %p;  sp: %#lx",
 		   info->si_code, info->VKI_SIGINFO_si_addr,
                    VG_UCONTEXT_STACK_PTR(uc));
-#endif
 
       if (0)
 	 VG_(kill_self)(sigNo);		/* generate a core dump */

==== //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#5 (text+ko) ====

@@ -298,6 +298,7 @@
    vg_assert(st->what == SsComplete);
    vg_assert(st->sres.isError);
    return st->sres.err;
+}
 
 #ifdef VGO_freebsd
 /* FreeBSD syscalls have TWO return values! */

==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#6 (text+ko) ====

@@ -620,11 +620,10 @@
 
 #elif defined(VGP_x86_freebsd)
    VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla;
-   vg_assert(canonical->what == SsSuccess 
-             || canonical->what == SsFailure);
-   gst->guest_EAX = canonical->val;
-   gst->guest_EDX = canonical->val2;
-   if (canonical->what == SsFailure) {
+   vg_assert(canonical->what == SsComplete);
+   gst->guest_EAX = canonical->sres.res;
+   gst->guest_EDX = canonical->sres.res2;
+   if (canonical->sres.isError) {
       LibVEX_GuestX86_put_eflag_c( 1, gst );
    } else {
       LibVEX_GuestX86_put_eflag_c( 0, gst );
@@ -632,11 +631,10 @@
 
 #elif defined(VGP_amd64_freebsd)
    VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla;
-   vg_assert(canonical->what == SsSuccess 
-             || canonical->what == SsFailure);
-   gst->guest_RAX = canonical->val;
-   gst->guest_RDX = canonical->val2;
-   if (canonical->what == SsFailure) {
+   vg_assert(canonical->what == SsComplete);
+   gst->guest_RAX = canonical->sres.res;
+   gst->guest_RDX = canonical->sres.res2;
+   if (canonical->sres.isError) {
       LibVEX_GuestAMD64_put_rflag_c( 1, gst );
    } else {
       LibVEX_GuestAMD64_put_rflag_c( 0, gst );
@@ -790,7 +788,7 @@
 {
    const SyscallTableEntry* sys = NULL;
 
-#  if defined(VGO_linux)
+#  if defined(VGO_linux) || defined(VGO_freebsd)
    if (syscallno < ML_(syscall_table_size) &&
        ML_(syscall_table)[syscallno].before != NULL)
       sys = &ML_(syscall_table)[syscallno];
@@ -1047,9 +1045,8 @@
          PRINT("SYSCALL[%d,%d](%3ld) ... [async] --> %s(0x%llx,0x%llx)\n",
                VG_(getpid)(), tid, sysno, 
                sci->status.sres.isError ? "Failure" : "Success",
-               (Long)sci->status.val, (Long)sci->status.val2 );
                sci->status.sres.isError ? (ULong)sci->status.sres.err
-                                        : (ULong)sci->status.sres.res );
+                                        : (ULong)sci->status.sres.res,
                sci->status.sres.isError ? (ULong)0
                                         : (ULong)sci->status.sres.res2 );
 #else
@@ -1094,9 +1091,8 @@
 #ifdef VGO_freebsd
          PRINT("[sync] --> %s(0x%llx, 0x%llx)\n",
                sci->status.sres.isError ? "Failure" : "Success",
-               (Long)sci->status.val, (Long)sci->status.val2 );
                sci->status.sres.isError ? (ULong)sci->status.sres.err
-                                        : (ULong)sci->status.sres.res );
+                                        : (ULong)sci->status.sres.res,
                sci->status.sres.isError ? (ULong)0
                                         : (ULong)sci->status.sres.res2 );
 #else

==== //depot/projects/valgrind/coregrind/m_trampoline.S#4 (text+ko) ====

@@ -803,6 +803,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #if defined(VGO_linux)
 /* Let the linker know we don't need an executable stack */

==== //depot/projects/valgrind/coregrind/pub_core_initimg.h#2 (text+ko) ====

@@ -67,7 +67,7 @@
 
 /* ------------------------- Linux ------------------------- */
 
-#if defined(VGO_linux)
+#if defined(VGO_linux) || defined(VGO_freebsd)
 
 struct _IICreateImageInfo {
    /* ------ Mandatory fields ------ */



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