From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 774 invoked by alias); 5 Dec 2001 17:31:59 -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 582 invoked from network); 5 Dec 2001 17:31:54 -0000 Received: from unknown (HELO mail00.oculustech.com) (64.221.47.99) by sources.redhat.com with SMTP; 5 Dec 2001 17:31:54 -0000 Received: from oculustech.com (dsl-64-192-85-73.telocity.com [64.192.85.73]) by mail00.oculustech.com (Postfix) with ESMTP id 15476741F; Wed, 5 Dec 2001 12:31:21 -0500 (EST) Message-ID: <3C0E5A06.8F79CFB4@oculustech.com> Date: Wed, 05 Dec 2001 09:31:00 -0000 From: Timothy Wall Reply-To: twall@oculustech.com Organization: Oculus Technologies X-Mailer: Mozilla 4.74 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: packing/unpacking 4-octet longs References: <3C0CD32D.A118C5A0@oculustech.com> <3C0E4A96.6070601@cygnus.com> Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00036.txt.bz2 Andrew Cagney wrote: > > Regarding the hard case, when you say that the byte order switches at an > odd address. Is this an odd word address or an odd byte address? > In this case the word address is the same as the byte address. One byte = 16 bits, i.e. octets are not addressable. So if you read a long (two words) from address 0x1000, the DSP grabs the MSW from 0x1000, and the LSW from 0x1001. If you read a long from address 0x2001, the DSP grabs the MSW from 0x2001, and the LSW from 0x2000. So in addition to ensuring that the data read by GDB for a long is aligned, I need to swap words if the original address wasn't aligned. T.