From: Michael Snyder <msnyder@specifix.com>
To: Guillaume MENANT <guillaume.menant@geensys.com>
Cc: gdb@sourceware.org
Subject: Re: GDB command to write to memory
Date: Thu, 28 Feb 2008 19:36:00 -0000 [thread overview]
Message-ID: <1204226956.19253.451.camel@localhost.localdomain> (raw)
In-Reply-To: <15730605.post@talk.nabble.com>
On Wed, 2008-02-27 at 22:38 -0800, Guillaume MENANT wrote:
> The command x is used to examine memory but i don't find the command to write
> directly a value in memory. I've tried X but it is not recognized.
There's no such command. The general method is to use
an assignment expression. You use a cast to determine
the size of memory (byte, word...) you want to write.
(gdb) set *(char *) 0xabcd = -1
You can do tricky things by using or omitting "signed",
and usually write up to an 8-byte word by using "long long".
prev parent reply other threads:[~2008-02-28 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 8:31 Guillaume MENANT
2008-02-28 9:42 ` Guillaume MENANT
2008-02-28 15:57 ` Andreas Schwab
2008-02-28 19:36 ` Michael Snyder [this message]
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=1204226956.19253.451.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=gdb@sourceware.org \
--cc=guillaume.menant@geensys.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