From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 23831 invoked from network); 8 Dec 1998 11:16:53 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Dec 1998 11:16:53 -0000 Received: from voicenet.com (mail11.voicenet.com [207.103.0.37]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id GAA00075 for ; Tue, 8 Dec 1998 06:11:10 -0500 Received: (qmail 13961 invoked from network); 8 Dec 1998 11:11:08 -0000 Received: from rotary328-pri.voicenet.com (HELO voicenet.com) (209.71.54.28) by mail11.voicenet.com with SMTP; 8 Dec 1998 11:11:08 -0000 Message-ID: <366D0A1A.1CBF765A@voicenet.com> Date: Tue, 08 Dec 1998 06:14:35 -0500 From: Uncle George Organization: None Avail X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: axp-list@redhat.com, Eric Ding Subject: Re: How do I find/fix unaligned accesses? References: <366C7BDA.3C48407C@voicenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In general, i try to fix alignment probs by: 1) break the kernel so that it always gives back a bus seg fault on alignment traps, ( at 1 time the fixups weren't so accurate in the 2.0.xx series 2) use gdb to catch the signal 3) use gdb to look at the "c" values 4) use gdb display/i $pc to get a feel at what machine instruction does u in OR disassemble the-routine-name to get/find instruction of where it went wrong 5) review the contents of registers - they usually have the address u are looking for as unaligned 6) fix what u think is wrong gat BTW caveots: 1) getting the sys to give segfaults on alignment probs tends to kill off other buggy unaligned programs, sometimes it nukes X components. 2) u sure the address u presented is not the addr of the instruction, rather than the operands being used ? 3) no need to xlate to decimal the hex number - if the last digit is 0, or 8 then its 8byte aligned, or if its 0,4,8,c then its at least 4byte aligned. 4) alleggedly in the 2.1.xx series, there is a system call to give u options as to how to process the alignment trap- most usefull if u just wanna screw up urself by requesting a seg-fault rather than the silent fixup on a per process basis. sorry dont know how to use - im not a 2.1.xx maven Eric Ding wrote: > Hi, > > OK, I can believe it needs to be on an 8 byte boundary. Now... next > question: isn't this address on just such a boundary? That is, > > > this, the kernel trapping so slowed things down on our automated testing > that it pretty much slowed the Alpha box down to a crawl. :( > > Eric > > Uncle George writes: > > > actually its the instruction - is it a quad instruction, then data must be