List Info

Thread: mem command and set command




mem command and set command
user name
2008-03-07 02:55:53
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?



Re: mem command and set command
country flaguser name
United States
2008-03-07 07:56:24
On Fri, Mar 07, 2008 at 04:55:53PM +0800, bjgnusunnorth.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 
0 =
0x1234 when I want to generate a 16-bit write.

-- 
Daniel Jacobowitz
CodeSourcery

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )