Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Uncle George <gatgul@voicenet.com>
To: axp-list@redhat.com, Eric Ding <ericding@applix.com>
Subject: Re: How do I find/fix unaligned accesses?
Date: Tue, 08 Dec 1998 06:14:35 -0500	[thread overview]
Message-ID: <366D0A1A.1CBF765A@voicenet.com> (raw)
In-Reply-To: yv4lnkjjndf.fsf@tuxedo.applix.com

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 <gatgul@voicenet.com> writes:
>
> > actually its the instruction - is it a quad instruction, then data must be




  parent reply	other threads:[~1998-12-08 11:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-04 18:25 How do I find/fix unaligned accesses? Eric Ding
1998-12-04 21:16 ` Oscar Levi
1998-12-04 21:17 ` nbecker
1998-12-04 21:18 ` Harvey J. Stein
1998-12-04 21:35 ` Rich Payne
1998-12-05  2:29   ` Tom Linden
1998-12-05 16:37     ` Oscar Levi
1998-12-07 23:45     ` Eric Ding
1998-12-08  0:44       ` Richard Hadsell
1998-12-08  1:07       ` Uncle George
1998-12-08  3:58         ` Eric Ding
1998-12-08  7:16           ` Wes Bauske
1998-12-08 11:14           ` Uncle George [this message]
1998-12-08 13:04             ` nbecker
  -- strict thread matches above, loose matches on Subject: below --
1998-12-08 21:13 Christian Groessler
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox