From owner-p4-projects@FreeBSD.ORG Fri Oct 24 04:42:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ADA451065671; Fri, 24 Oct 2008 04:42:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5913F106566C for ; Fri, 24 Oct 2008 04:42:45 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 468868FC13 for ; Fri, 24 Oct 2008 04:42:45 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9O4gjsi059119 for ; Fri, 24 Oct 2008 04:42:45 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9O4gjDi059117 for perforce@freebsd.org; Fri, 24 Oct 2008 04:42:45 GMT (envelope-from peter-gmail@wemm.org) Date: Fri, 24 Oct 2008 04:42:45 GMT Message-Id: <200810240442.m9O4gjDi059117@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter-gmail@wemm.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 151843 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 04:42:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=151843 Change 151843 by peter@peter_cheese on 2008/10/24 04:41:44 Cosmetic tweaks to sync to linux counterparts. Affected files ... .. //depot/projects/valgrind/coregrind/m_coredump/coredump-amd64-freebsd.c#2 edit .. //depot/projects/valgrind/coregrind/m_coredump/coredump-x86-freebsd.c#3 edit .. //depot/projects/valgrind/coregrind/m_sigframe/sigframe-x86-freebsd.c#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#5 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#11 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#8 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_coredump/coredump-amd64-freebsd.c#2 (text+ko) ==== @@ -7,7 +7,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2000-2006 Julian Seward + Copyright (C) 2000-2008 Julian Seward jseward@acm.org This program is free software; you can redistribute it and/or @@ -29,6 +29,7 @@ */ #include "pub_core_basics.h" +#include "pub_core_vki.h" #include "pub_core_libcbase.h" #include "pub_core_coredump.h" #include "pub_core_threadstate.h" ==== //depot/projects/valgrind/coregrind/m_coredump/coredump-x86-freebsd.c#3 (text+ko) ==== @@ -7,7 +7,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2000-2005 Julian Seward + Copyright (C) 2000-2008 Julian Seward jseward@acm.org This program is free software; you can redistribute it and/or @@ -83,6 +83,30 @@ //:: fill_fpu(fpu, (const Char *)&arch->m_sse); } +#if 0 +void ML_(fill_elffpxregs_from_tst)(vki_elf_fpxregset_t* xfpu, + const ThreadArchState* arch) +{ +//:: xfpu->cwd = ?; +//:: xfpu->swd = ?; +//:: xfpu->twd = ?; +//:: xfpu->fop = ?; +//:: xfpu->fip = ?; +//:: xfpu->fcs = ?; +//:: xfpu->foo = ?; +//:: xfpu->fos = ?; +//:: xfpu->mxcsr = ?; + xfpu->reserved = 0; +//:: xfpu->st_space = ?; + +# define DO(n) VG_(memcpy)(xfpu->xmm_space + n * 4, &arch->vex.guest_XMM##n, sizeof(arch->vex.guest_XMM##n)) + DO(0); DO(1); DO(2); DO(3); DO(4); DO(5); DO(6); DO(7); +# undef DO + + VG_(memset)(xfpu->padding, 0, sizeof(xfpu->padding)); +} +#endif + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ ==== //depot/projects/valgrind/coregrind/m_sigframe/sigframe-x86-freebsd.c#3 (text+ko) ==== @@ -8,7 +8,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2000-2005 Nicholas Nethercote + Copyright (C) 2000-2008 Nicholas Nethercote njn@valgrind.org This program is free software; you can redistribute it and/or @@ -38,10 +38,10 @@ #include "pub_core_libcprint.h" #include "pub_core_machine.h" #include "pub_core_options.h" -#include "pub_core_sigframe.h" #include "pub_core_signals.h" #include "pub_core_tooliface.h" #include "pub_core_trampoline.h" +#include "pub_core_sigframe.h" /* self */ /* This module creates and removes signal frames for signal deliveries @@ -414,14 +414,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"); @@ -605,8 +605,8 @@ caller to do. */ if (0) - VG_(printf)("pushed signal frame; %%ESP now = %p, " - "next %%EIP = %p, status=%d\n", + VG_(printf)("pushed signal frame; %%ESP now = %#lx, " + "next %%EIP = %#x, status=%d\n", esp, tst->arch.vex.guest_EIP, tst->status); } @@ -726,7 +726,9 @@ Int sigNo; tst = VG_(get_ThreadState)(tid); - esp = tst->arch.vex.guest_ESP; + + /* Correctly reestablish the frame base address. */ + esp = tst->arch.vex.guest_ESP; #if 0 if (isRT) @@ -742,7 +744,7 @@ if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%p", + "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x", tid, isRT, tst->arch.vex.guest_EIP); /* tell the tools */ ==== //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#5 (text+ko) ==== @@ -7,7 +7,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2000-2006 Nicholas Nethercote + Copyright (C) 2000-2008 Nicholas Nethercote njn@valgrind.org This program is free software; you can redistribute it and/or ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#11 (text+ko) ==== @@ -54,8 +54,8 @@ #include "priv_types_n_macros.h" #include "priv_syswrap-generic.h" +#include "priv_syswrap-freebsd.h" -#include "priv_syswrap-freebsd.h" // Run a thread from beginning to end and return the thread's // scheduler-return-code. @@ -78,7 +78,7 @@ VG_(printf)("thread tid %d started: stack = %p\n", tid, &tid); - VG_TRACK (pre_thread_first_insn, tid); + VG_TRACK(pre_thread_first_insn, tid); tst->os_state.lwpid = VG_(gettid)(); tst->os_state.threadgroup = VG_(getpid)(); @@ -315,11 +315,11 @@ VG_(sigprocmask)(VKI_SIG_SETMASK, &fork_saved_mask, NULL); /* If --child-silent-after-fork=yes was specified, set the - logging file descriptor to an 'impossible' value. This is - noticed by send_bytes_to_logging_sink in m_libcprint.c, which - duly stops writing any further logging output. */ + logging file descriptor to an 'impossible' value. This is + noticed by send_bytes_to_logging_sink in m_libcprint.c, which + duly stops writing any further logging output. */ if (!VG_(logging_to_socket) && VG_(clo_child_silent_after_fork)) - VG_(clo_log_fd) = -1; + VG_(clo_log_fd) = -1; } else if (!res.isError && res.res > 0) { @@ -327,7 +327,7 @@ VG_(do_atfork_parent)(tid); if (VG_(clo_trace_syscalls)) - VG_(printf)(" clone(fork): process %d created child %ld\n", + VG_(printf)(" clone(fork): process %d created child %ld\n", VG_(getpid)(), res.res); /* restore signal mask */ ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#8 (text+ko) ==== @@ -37,7 +37,6 @@ #include "pub_core_vki.h" #include "pub_core_vkiscnums.h" #include "pub_core_threadstate.h" -#include "pub_core_debuginfo.h" // VG_(di_notify_mmap) #include "pub_core_aspacemgr.h" #include "pub_core_debuglog.h" #include "pub_core_libcbase.h"