From owner-freebsd-questions@FreeBSD.ORG Fri Jun 9 02:39:47 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDBAD16A419 for ; Fri, 9 Jun 2006 02:39:47 +0000 (UTC) (envelope-from pranavpeshwe@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id C93CA43D82 for ; Fri, 9 Jun 2006 02:39:46 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: by nz-out-0102.google.com with SMTP id z3so599203nzf for ; Thu, 08 Jun 2006 19:39:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=DqjDy42JJfzdT9c7AKUci6SjC1+DCteqN3cqmpw+cCoUB4WqBY5YfBBV9Wo5ObpMI6Hj55MGT23tAtKtZjP72/ixfU6G/WJSRx414vBdjwfH6phxOcD0ywkmlpy9kc69qRlOT6dcP6WgQ0gNP1vl2rn5gVZJB5vu9cquvnm+ip0= Received: by 10.36.247.27 with SMTP id u27mr3265631nzh; Thu, 08 Jun 2006 19:39:44 -0700 (PDT) Received: by 10.36.104.10 with HTTP; Thu, 8 Jun 2006 19:39:44 -0700 (PDT) Message-ID: Date: Fri, 9 Jun 2006 02:39:44 +0000 From: "Pranav Peshwe" To: freebsd-questions@freebsd.org In-Reply-To: <4486A111.6020300@oxygen.az> MIME-Version: 1.0 References: <4486A111.6020300@oxygen.az> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tofik Suleymanov Subject: Re: reading process memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 02:39:48 -0000 On 6/7/06, Tofik Suleymanov wrote: > > Hello, folks > > I believe that it is possible to read contents of the memory > used/utilized by a process (assuming right privileges). > First i've tried to do this through procfs by reading 'mem' property of > the given process, but no success. > Maybe there is another way of doing such things ? > Any clue would be appreciated. If i understood correctly what you wish to do,then you can use the proc_rwmem() function in the kernel.But ofcourse, it can only be used through a KLD or directly through the kernel src.This is what ptrace ultimately uses. For 5.4 stable you can find it here : http://fxr.watson.org/fxr/ident?v=RELENG54&i=proc_rwmem HTH. Regards, Pranav -------------------------------------------------------- UNIX is a computer virus with an interface. -- The UNIX-HATERS Handbook