Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Tom Linden <tom@kednos.com>
To: axp-list@redhat.com
Cc: axp-list@redhat.com, Eric Ding <ericding@applix.com>
Subject: Re: How do I find/fix unaligned accesses?
Date: Fri, 4 Dec 1998 18:29:24 -0800 (PST)	[thread overview]
Message-ID: <Pine.ULT.3.91.981204182134.6659z-100000@gunn.kednos.com> (raw)
In-Reply-To: <36685594.38C3976A@adam.cheshire.net>

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 <rdp@adam.cheshire.net>
> To: axp-list@redhat.com, Eric Ding <ericding@applix.com>
> 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
> 
> 


  reply	other threads:[~1998-12-05  2:33 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 [this message]
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
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