This is the mail archive of the gdb@sources.redhat.com 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]

How does one change the data size of write parameters in a gdbstub ?


I'm writing a "stub" for gdb-68hc11-elf using Motorola's dbug12 as the
target.  I am using the bdm12 stub as an example. 

Everything is going well, except that I need to change the size of the
memory writes.  The 68hc11 family how includes 68hc12 devices and
specifically the 68HC9S12DP256, which has a 256K flash module.  The
example I am following only supports 64K devices due to the use of ints
as parameters in the write routine.  

Specifically, the following appears in remote-dbug12.c (also in remote-
bdm12.c):

gdbdbug12_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int
len,int write, struct mem_attrib *attrib ATTRIBUTE_UNUSED,
               struct target_ops *target ATTRIBUTE_UNUSED)

The problem with this is that it uses ints which restrict the memory
size to 64K, whereas we will need longs to support the 256K of the
'DP256 device. 

How does one change the ints to longs ?  I am unsure how this routine
interfaces to the rest of gdb.  Can I just arbitrarily make a change
here or do I have to change something elsewhere ?  I think the CORE_ADDR
definition is an int as well. 

BTW: this might be a naive question, but why weren't these unsigned
ints ?

Thanks in advance.

-- 
Kim Lux,  Diesel Research Inc.



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