* read/write arbitrary files
@ 2008-08-26 16:29 Bjorn Helgaas
2008-08-26 16:41 ` Michael Snyder
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2008-08-26 16:29 UTC (permalink / raw)
To: gdb
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.
Bjorn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read/write arbitrary files
2008-08-26 16:29 read/write arbitrary files Bjorn Helgaas
@ 2008-08-26 16:41 ` Michael Snyder
2008-08-27 7:30 ` Bjorn Helgaas
0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2008-08-26 16:41 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: gdb
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read/write arbitrary files
2008-08-26 16:41 ` Michael Snyder
@ 2008-08-27 7:30 ` Bjorn Helgaas
2008-08-27 15:22 ` Michael Snyder
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2008-08-27 7:30 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read/write arbitrary files
2008-08-27 7:30 ` Bjorn Helgaas
@ 2008-08-27 15:22 ` Michael Snyder
0 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2008-08-27 15:22 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: gdb
Bjorn Helgaas wrote:
> 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.
I see.
Well, if it were me, I think I would write a little
proxy program that could read /dev/mem, and then serve
memory packets to gdb using a socket and the gdb remote
protocol, after the fashion of gdbserver.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-25 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26 16:29 read/write arbitrary files Bjorn Helgaas
2008-08-26 16:41 ` Michael Snyder
2008-08-27 7:30 ` Bjorn Helgaas
2008-08-27 15:22 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox