Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IHl0r-0004RT-Pi for mharc-grub-devel@gnu.org; Sun, 05 Aug 2007 14:39:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IHl0p-0004RL-NU for grub-devel@gnu.org; Sun, 05 Aug 2007 14:39:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IHl0i-0004R8-SP for grub-devel@gnu.org; Sun, 05 Aug 2007 14:39:34 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IHl0i-0004R5-MH for grub-devel@gnu.org; Sun, 05 Aug 2007 14:39:28 -0400 Received: from wx-out-0506.google.com ([66.249.82.229]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IHl0h-00065u-1c for grub-devel@gnu.org; Sun, 05 Aug 2007 14:39:27 -0400 Received: by wx-out-0506.google.com with SMTP id s7so1133661wxc for ; Sun, 05 Aug 2007 11:39: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:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ClCWuCOzYAc794YBePbS6ZQL3whfDrvQWOPPOKx8OYZ5w2Co9C1DFSvjQCGwMxGa4XjUI7zUAcoHCjDEpwwQNUYfHEbjWpXkzmhXoasQVIrRkz4kql18cU+u5XAjcNIrUlCu9rNgHj0qz5pn1Yya9VUvjlsEvzzj8u3YOM6w27Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ST6qnh7u2g7xnYj67LwTcKvZEK+mKD6tu4/cv1t7vp77smTTUp94k+gFsLdjW67Z3solbCwxNmZBg6ESQMoFA4VUbvqPiesUqQZo0QoPIKZawlrUfnPjRE0dMIlbldYmP/DCjHWUEZq9mYLn6uNjOnDKKWXrjGxaYf+z5ibRKLY= Received: by 10.90.79.6 with SMTP id c6mr4168658agb.1186339144757; Sun, 05 Aug 2007 11:39:04 -0700 (PDT) Received: by 10.90.100.13 with HTTP; Sun, 5 Aug 2007 11:39:04 -0700 (PDT) Message-ID: Date: Sun, 5 Aug 2007 13:39:04 -0500 From: "Hollis Blanchard" Sender: slightlyunconventional@gmail.com To: "The development of GRUB 2" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 0b19678fc8c33947 X-Detected-Kernel: Linux 2.6 (newer, 2) Subject: Re: New command dump X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2007 18:39:36 -0000 On 8/3/07, Bean wrote: > Hi, > > I have written a new command dump, it can hex dump content of file or memory. > > usage: > > dump [-s skip] [-n length] { FILE | (mem) } > > The output look just like command hexdump. > > If you use (mem) as filename, it will dump physical memory instead of > file. when dumping memory, the default length is 256, but when dumping > normal file, the default length is the whole file. > > Inside grub2, modules can call function dump directly: > > void dump(unsigned long base,char* buf, int len); Thanks, I've been meaning to submit something like this for a long time. :) The module I wrote actually had one more convenience feature: it keeps a "position" pointer, and if you run the command again without an address, it displays the memory immediately after the last dump. -Hollis