Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: read/write arbitrary files
Date: Wed, 27 Aug 2008 07:30:00 -0000	[thread overview]
Message-ID: <200808251150.57002.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <48B2EA7E.7030501@vmware.com>

On Monday 25 August 2008 11:23:10 am Michael Snyder wrote:
> 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.

The hex editor part is easy.  I know how to do that already.

The disassembly part is much harder, and this is the part
I'm looking for.  It'd be very handy to use all the
disassemblers and the well-known user interface of gdb.

Another useful feature of gdb is its knowledge of types.  It
would be convenient to be able to read type information from
an executable, then use that information to format structures
from /dev/mem.

Bjorn


  reply	other threads:[~2008-08-25 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 16:29 Bjorn Helgaas
2008-08-26 16:41 ` Michael Snyder
2008-08-27  7:30   ` Bjorn Helgaas [this message]
2008-08-27 15:22     ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808251150.57002.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=gdb@sourceware.org \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox