From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29143 invoked by alias); 20 Jan 2005 18:37:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29122 invoked from network); 20 Jan 2005 18:37:02 -0000 Received: from unknown (HELO cw-ventures.com) (208.234.10.76) by sourceware.org with SMTP; 20 Jan 2005 18:37:02 -0000 Received: from 192.168.1.100 (S01060012170db558.cg.shawcable.net [68.146.99.119]) by cw-ventures.com (8.12.10/8.11.6) with ESMTP id j0KIb4t8018910 for ; Thu, 20 Jan 2005 13:37:05 -0500 Subject: How does one change the data size of write parameters in a gdb stub ? From: Kim Lux To: gdb@sources.redhat.com In-Reply-To: <1106244781.5846.ezmlm@sources.redhat.com> References: <1106244781.5846.ezmlm@sources.redhat.com> Content-Type: text/plain Date: Thu, 20 Jan 2005 18:37:00 -0000 Message-Id: <1106246220.7335.19.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00101.txt.bz2 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.