This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mem command and set command


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]