From owner-p4-projects@FreeBSD.ORG Sat Nov 15 21:19:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7300B1065697; Sat, 15 Nov 2008 21:19: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 3644E1065694 for ; Sat, 15 Nov 2008 21:19: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 256CA8FC08 for ; Sat, 15 Nov 2008 21:19: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 mAFLJjwK014620 for ; Sat, 15 Nov 2008 21:19:45 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mAFLJjtG014618 for perforce@freebsd.org; Sat, 15 Nov 2008 21:19:45 GMT (envelope-from peter-gmail@wemm.org) Date: Sat, 15 Nov 2008 21:19:45 GMT Message-Id: <200811152119.mAFLJjtG014618@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 153016 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: Sat, 15 Nov 2008 21:19:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=153016 Change 153016 by peter@peter_overcee on 2008/11/15 21:18:58 Turn on userland vs kernel siginfo detection and handling. Affected files ... .. //depot/projects/valgrind/coregrind/m_signals.c#10 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_signals.c#10 (text+ko) ==== @@ -1538,7 +1538,6 @@ 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. @@ -1584,7 +1583,6 @@ restore_all_host_signals(&savedmask); } -#endif /* Returns the next queued signal for thread tid which is in "set". @@ -1775,8 +1773,8 @@ VG_(printf)("si_uid %d\n", info->si_uid); VG_(printf)("si_status %d\n", info->si_status); VG_(printf)("si_addr %p\n", info->si_addr); -VG_(printf)("si_value %d\n", info->si_value); -VG_(printf)("si_band %d\n", info->si_band); +VG_(printf)("si_value %p\n", info->si_value.sival_ptr); +VG_(printf)("si_band %ld\n", info->si_band); #endif #ifdef VGO_linux @@ -1791,9 +1789,13 @@ info->si_code = (Short)info->si_code; #endif -/* QQQ crap! fix this! 4.x is totally busted here! */ -#ifndef VGO_freebsd +#if defined(VGO_linux) || defined(VGO_aix5) if (info->si_code <= VKI_SI_USER) { +#elif defined(VGO_freebsd) + if (info->si_code >= VKI_SI_USER) { +#else +# error Unknown OS +#endif /* If some user-process sent us one of these signals (ie, they're not the result of a faulting instruction), then treat it as an async signal. This is tricky because we could get @@ -1828,7 +1830,7 @@ continue unless we get it. */ VG_(message)(Vg_UserMsg, "Signal %d (%s) appears to have lost its siginfo; I can't go on.", sigNo, signame(sigNo)); -#ifdef VGO_linux +#if defined(VGO_linux) VG_(message)(Vg_UserMsg, " This may be because one of your programs has consumed your"); VG_(message)(Vg_UserMsg, " ration of siginfo structures."); VG_(printf)( @@ -1857,7 +1859,7 @@ /* Since every thread has these signals unblocked, we can't rely on the kernel to route them properly, so we need to queue them manually. */ -#ifdef VKI_SI_TKILL +#if defined(VKI_SI_TKILL) if (info->si_code == VKI_SI_TKILL) queue_signal(tid, info); /* directed to us specifically */ else @@ -1866,7 +1868,6 @@ return; } -#endif if (VG_(clo_trace_signals)) { VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d, "