From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8345 invoked by alias); 22 Aug 2008 13:42:19 -0000 Received: (qmail 8176 invoked by uid 22791); 22 Aug 2008 13:42:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Aug 2008 13:41:37 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 51C9F981EB; Fri, 22 Aug 2008 13:41:35 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 32139981EA; Fri, 22 Aug 2008 13:41:35 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KWWtS-0004MT-Fc; Fri, 22 Aug 2008 09:41:34 -0400 Date: Fri, 22 Aug 2008 14:43:00 -0000 From: Daniel Jacobowitz To: Robin den Hertog Cc: gdb@sourceware.org Subject: Re: byte word and int(32) safe memory access? Message-ID: <20080822134134.GA16468@caradoc.them.org> Mail-Followup-To: Robin den Hertog , gdb@sourceware.org References: <1021db0c0808220135s7ff206fexbc0e410889414558@mail.gmail.com> <20080822112353.GA9175@caradoc.them.org> <1021db0c0808220616x1c967d1eh4b46027c6021052f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1021db0c0808220616x1c967d1eh4b46027c6021052f@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00252.txt.bz2 On Fri, Aug 22, 2008 at 03:16:48PM +0200, Robin den Hertog wrote: > the documentation and code of gdb lead me to believe the only time you > read memory larger than a byte at once is for speed optimization. > but you're saying that is i request an address with the length at 2 > bytes it will always be read in ONE read action ($m40,2#xx)? > or > does it depend on the address size? > "even if addr is word-aligned and length is a multiple of the word > size, the stub is free to use byte accesses" > I figured that meant even $m00004040,4#xx and any length above that > (but still dividable by 4) you would still be unsure how it is read. > > changing the stub could still mean that as soon as you connect a > different fpga (to the same cpu) you have to rewrite your stub ?. In practice GDB will never do byte accesses if you ask for a word. What your stub does with them is up to the stub. But you're in control of the stub, presumably? -- Daniel Jacobowitz CodeSourcery