From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4832 invoked by alias); 18 Jul 2002 14:26:34 -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 4825 invoked from network); 18 Jul 2002 14:26:33 -0000 Received: from unknown (HELO motgate.mot.com) (129.188.136.100) by sources.redhat.com with SMTP; 18 Jul 2002 14:26:33 -0000 Received: [from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (motgate 2.1) with ESMTP id HAA13644; Thu, 18 Jul 2002 07:26:32 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id HAA10948; Thu, 18 Jul 2002 07:26:32 -0700 (MST)] Received: from hyper.wm.sps.mot.com (hyper.wm.sps.mot.com [199.10.246.43]) by mail.wm.sps.mot.com (8.9.3/8.9.3) with ESMTP id KAA31150; Thu, 18 Jul 2002 10:26:28 -0400 Received: by hyper.wm.sps.mot.com (8.11.2) id g6IEQUQ17605; Thu, 18 Jul 2002 10:26:30 -0400 Date: Thu, 18 Jul 2002 07:26:00 -0000 Message-Id: <200207181426.g6IEQUQ17605@hyper.wm.sps.mot.com> From: Peter Barada To: aminayev@yahoo.com CC: gdb@sources.redhat.com In-reply-to: <20020718062715.6968.qmail@web13502.mail.yahoo.com> (message from Alexei Minayev on Wed, 17 Jul 2002 23:27:15 -0700 (PDT)) Subject: Re: gdb-h8-stub References: <20020718062715.6968.qmail@web13502.mail.yahoo.com> X-SW-Source: 2002-07/txt/msg00178.txt.bz2 >I'm confused. My gdb stub does not support binary downloads, but the gdb acts >like it does. >It starts downloading the program as usual: >(gdb) set remotedebug 1 >(gdb) load >Loading section .text, size 0x160 lma 0x200000 >Sending packet: $X200000,0:#10...Ack >Packet received: >binary downloading NOT suppported by target > >note here, the program starts at 0x200000, the gdb sends an 'X' packet with >that address, but receives nothing back. It concludes there, that since the >responce to 'X' is empty, binary download is not supported by target. > >But then, it sends a bunch of 'M' commands, which have addresses relative to >the 0x200000 one. But the 0x200000 was sent to target with 'X', and the 'X' >failed... You're right about gdb infering that the stub doesn't support 'X' by the empty response packet. An empty packet is the response the stub sends back to the host for any command that it doesn't understand. Once gdb figures out that 'X' (write binary to memory) isn't supported by the stub(due to the empy packet), it falls back to trying 'M' (write hex to memory) and finds that it works(since all stubs are required to support 'M'). The 'X' command is an extension so 'load' runs about twice as fast. -- Peter Barada Peter.Barada@motorola.com Wizard 781-852-2768 (direct) WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)