From owner-cvs-all@FreeBSD.ORG Wed Apr 11 20:10:05 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02DE416A401 for ; Wed, 11 Apr 2007 20:10:05 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.freebsd.org (Postfix) with ESMTP id B889713C44C for ; Wed, 11 Apr 2007 20:10:04 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so255164pyh for ; Wed, 11 Apr 2007 13:10:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GRcpSCa8GhIQ2u9MyCz984Z0NIrYbN8/jQQGxIkHrrTuK9tD8ME3sVtd4HY4w2EPgsu4SR9H/JjLwa46bXKMNFFHxOCbfgZF9mV4DTuFwt3pC8FlcwvzqnyvBWId5sSE2Vn7LCJpGIYbs/AjgBnzM2Wd6s6HF2fcwn04WCLmtCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=R3x90AazWl41CzqIiYnbWGGHG8v3ogB3p0onasKvGutqiARaAv02zvOdpKecLflZaBhSWh5gOxIvTSLRgjQt9yP4Jh4Y1/xSbQVfQ0FXTKvu+GQ1pIznk251+Y5mszKLqZ6uwJdV/IbuG1hkBT/nWDuNjFpD76eLT6uW2zLDHWo= Received: by 10.65.236.14 with SMTP id n14mr2151785qbr.1176322204064; Wed, 11 Apr 2007 13:10:04 -0700 (PDT) Received: by 10.65.244.16 with HTTP; Wed, 11 Apr 2007 13:10:03 -0700 (PDT) Message-ID: Date: Wed, 11 Apr 2007 12:10:03 -0800 From: "Kip Macy" To: "Ed Maste" In-Reply-To: <88607eb20704101217x4e3c81f9xf914f7da7714daf8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200704100403.l3A43ZnL057659@repoman.freebsd.org> <88607eb20704101217x4e3c81f9xf914f7da7714daf8@mail.gmail.com> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Xin LI , cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.bin/truss Makefile amd64-fbsd.c extern.h i386-fbsd.c i386-linux.c ia64-fbsd.c main.c powerpc-fbsd.c setup.c sparc64-fbsd.c syscall.h syscalls.c truss.1 truss.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2007 20:10:05 -0000 On 4/10/07, Ed Maste wrote: > On 10/04/07, Xin LI wrote: > > Make use of ptrace(2) instead of procfs in truss(1), eliminating > > yet another need of an available /proc/ mount. > > I've started to do the same thing to gcore(1), in order to make it > work properly with threaded applications. I've removed its dependency > on /proc/pid/mem, /proc/pid/regs, and /proc/pid/fpregs. However, it > still relies on /proc/pid/status and /proc/pid/map which are not > directly available via ptrace(2). > > This would make the -s option to gcore redundant (since the process > will be stopped after attaching anyway). I don't know how useful a > core from a non-stopped process is, anyhow. Fork it to get a COW snapshot and then gcore the stopped forked process. (Yes this would probably require a new syscall or a new ptrace interface, but it would be trivial to add). -Kip