This is the mail archive of the
mailing list for the GDB project.
Re: read/write arbitrary files
- From: Michael Snyder <msnyder at vmware dot com>
- To: Bjorn Helgaas <bjorn dot helgaas at hp dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 25 Aug 2008 10:23:10 -0700
- Subject: Re: read/write arbitrary files
- References: <email@example.com>
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.