From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6054 invoked from network); 5 Dec 1998 02:33:05 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 5 Dec 1998 02:33:05 -0000 Received: from kednos.com (gunn.kednos.com [198.68.96.5]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id VAA11278 for ; Fri, 4 Dec 1998 21:28:53 -0500 Received: by kednos.com; (5.57/1.1.8.2/19Sep94-0756PM) id AA08712; Fri, 4 Dec 98 18:29:35 -0800 Date: Fri, 4 Dec 1998 18:29:24 -0800 (PST) From: Tom Linden To: axp-list@redhat.com Cc: axp-list@redhat.com, Eric Ding Subject: Re: How do I find/fix unaligned accesses? In-Reply-To: <36685594.38C3976A@adam.cheshire.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII This is generally the right approach, but having done this many times there is a bit more to do. Once you have breakpointed, you need to determine which variable is offending, and this generally means examing the assembler statements with gdb and relating it to the source. Once identified you need to find the declaration of the variable whether static or automatic, and by looking at the declaration trying to figure out how it got allocated on the inappropriate boundary. If it is this simple then padding by dummy allocations of the appropriate size will fix it. If however, this is the result of aliasing, this may require more difficult source code changes. use of 'nm' helps a lot. good luck. Tom On Fri, 4 Dec 1998, Rich Payne wrote: > Date: Fri, 04 Dec 1998 16:35:16 -0500 > From: Rich Payne > To: axp-list@redhat.com, Eric Ding > Subject: Re: How do I find/fix unaligned accesses? > > I didn't write this, but I picked it up from somewhere!! > > > >If you get a message like so: > > > > identd(15285): unaligned trap at 0000000120024a9c: 000000011ffffa34 2d > 10 > > > >you fire up gdb on identd (which must be linked with -g, and preferably > >statically with the debugging version of libc) and type: > > > > info line *0x0000000120024a9c > > > >which tells you: > > > >Line 888 of "vfscanf.c" starts at address 0x120024a40 <_IO_vfscanf+10400> > > and ends at 0x120024aa4 <_IO_vfscanf+10500>. > > > >So, the problem is at line 888 of vfscanf.c. > > > > > >Paul Slootman > > Hope it helps... > regards, > rdp > > Eric Ding wrote: > > > > Hi all, > > > > I've read the FAQ about unaligned accesses on Alpha Linux. My question is, > > now that I've got a whole log full of errors about unaligned accesses, how > > do I go about tracking down the actual place in the code that's causing the > > problem? > > > > I see, for example, > > > > axmain(521): unaligned trap at 0000000120472178: 000000011ffff2f4 2d 2 > > > > in /var/log/messages. Now what? Help me get Applixware for Linux/Alpha > > out the door! :) > > > > Thanks, > > Eric > > -- > > Senior Software Engineer / ericding@applix.com <>< > > Applix, Inc. / 112 Turnpike Road / Westboro MA 01581-2842 > > > > -- > > To unsubscribe: send e-mail to axp-list-request@redhat.com with > > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > > -- > Rich Payne > www.alphalinux.org > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > >