From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9853 invoked by alias); 18 Jul 2002 14:37:01 -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 9841 invoked from network); 18 Jul 2002 14:36:59 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 18 Jul 2002 14:36:59 -0000 Received: from dsl254-114-118.nyc1.dsl.speakeasy.net ([216.254.114.118] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17VCOj-0000uK-00; Thu, 18 Jul 2002 09:36:53 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17VCOm-0004pw-00; Thu, 18 Jul 2002 10:36:56 -0400 Date: Thu, 18 Jul 2002 07:37:00 -0000 From: Daniel Jacobowitz To: Peter Barada Cc: aminayev@yahoo.com, gdb@sources.redhat.com Subject: Re: gdb-h8-stub Message-ID: <20020718143656.GA17241@nevyn.them.org> Mail-Followup-To: Peter Barada , aminayev@yahoo.com, gdb@sources.redhat.com References: <20020718062715.6968.qmail@web13502.mail.yahoo.com> <200207181426.g6IEQUQ17605@hyper.wm.sps.mot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207181426.g6IEQUQ17605@hyper.wm.sps.mot.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00179.txt.bz2 On Thu, Jul 18, 2002 at 10:26:30AM -0400, Peter Barada wrote: > > >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. Right. The corollary is that M and X should be using the same address. This works for most targets; you'll need to figure out why it doesn't work for yours. It may be a VMA/LMA thing... -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer