This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Manipulating memory
> I have read the GDB manual, and I could not find a way to manipulate a
> memory, for example: set values at given address. I only found a way
> to view it using '-data-read-memory' command,
> is this true or did I miss something?
To view memory at a given address, I usually use the "x" command.
To write memory, I use "set {TYPE}ADDRESS := VALUE" (or something
like that, I'm completely jetlagged right now). For instance, to
set a byte at 0xdeadbeef to 0x48, I would do:
(gdb) set {char} 0xdeadbeef = 0x48
(This assume that the current language is C)
--
Joel