This is the mail archive of the
mailing list for the GDB project.
How does one change the data size of write parameters in a gdbstub ?
- From: Kim Lux <lux at diesel-research dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 20 Jan 2005 11:37:00 -0700
- Subject: How does one change the data size of write parameters in a gdbstub ?
- References: <email@example.com>
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-
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
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
Thanks in advance.
Kim Lux, Diesel Research Inc.