From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2713 invoked by alias); 25 Aug 2008 17:26:17 -0000 Received: (qmail 2704 invoked by uid 22791); 25 Aug 2008 17:26:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.113.40.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 25 Aug 2008 17:25:42 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.64.160]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id B761D6A60; Mon, 25 Aug 2008 10:25:40 -0700 (PDT) Received: from [10.20.92.47] (promb-2s-dhcp47.eng.vmware.com [10.20.92.47]) by mailhost2.vmware.com (Postfix) with ESMTP id AC6488E7DF; Mon, 25 Aug 2008 10:25:40 -0700 (PDT) Message-ID: <48B2EA7E.7030501@vmware.com> Date: Tue, 26 Aug 2008 16:41:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Bjorn Helgaas CC: "gdb@sourceware.org" Subject: Re: read/write arbitrary files References: <200808251040.08733.bjorn.helgaas@hp.com> In-Reply-To: <200808251040.08733.bjorn.helgaas@hp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00273.txt.bz2 Bjorn Helgaas wrote: > I'd like to use gdb to examine and update arbitrary files. In > particular, I'd like to disassemble and patch files like /dev/mem > that are not in executable or core formats. > > Is there already a way to do this? If not, could there be? This > was a very useful feature of adb. It's not really what gdb is good for. Arbitrary files such as /dev/mem have no symbols and no types. It should be easy to either use an existing hex editor, or write one to do this sort of patching. This tool could be orders of magnitude less complicated than gdb.