Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: bjgnu@sunnorth.com.cn
Cc: gdb@sourceware.org
Subject: Re: mem command and set command
Date: Fri, 07 Mar 2008 18:19:00 -0000	[thread overview]
Message-ID: <20080307135624.GA13487@caradoc.them.org> (raw)
In-Reply-To: <OF428D5D4B.B15CCB06-ON48257405.0030FEA6-48257405.00310ED5@sunnorth.com.cn>

On Fri, Mar 07, 2008 at 04:55:53PM +0800, bjgnu@sunnorth.com.cn wrote:
> hello all,
> 
> Executing the following GDB commands:
>  
> mem 0x0 0x100 16
> set *0x0=0x12345678
> 
> I found the 3rd parameter of write_memory (CORE_ADDR memaddr, const 
> bfd_byte *myaddr, int len) is always 4.
> I think the length should be 2 because "mem 0x0 0x100 16" has set memory 
> width to 16.
> Does "mem" command affect write memory operation? 

No.  The width appears to be unused.  I just use set {short} 0 =
0x1234 when I want to generate a 16-bit write.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2008-03-07 13:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07 13:56 bjgnu
2008-03-07 18:19 ` Daniel Jacobowitz [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=20080307135624.GA13487@caradoc.them.org \
    --to=drow@false.org \
    --cc=bjgnu@sunnorth.com.cn \
    --cc=gdb@sourceware.org \
    /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