From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 27709 invoked from network); 7 Apr 1998 07:30:42 -0000 Received: from finwds01.tu-graz.ac.at (129.27.138.60) by mail2.redhat.com with SMTP; 7 Apr 1998 07:30:42 -0000 Received: from finwal01.tu-graz.ac.at (tom@finwal01.tu-graz.ac.at [129.27.138.63]) by finwds01.tu-graz.ac.at (8.8.8/8.8.8) with SMTP id JAA14099; Tue, 7 Apr 1998 09:30:14 +0200 Received: from localhost by finwal01.tu-graz.ac.at (5.65v4.0/1.1.10.5/03Feb97-0824AM) id AA02697; Tue, 7 Apr 1998 09:30:13 +0200 Date: Tue, 7 Apr 1998 09:30:13 +0200 (MET DST) From: Thomas Leitner X-Sender: tom@finwal01.tu-graz.ac.at To: Richard Henderson Cc: Gene McCulley , axp-list@redhat.com Subject: Re: tracking down unaligned accesses In-Reply-To: <19980406203802.33715@dot.cygnus.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Apr 1998, Richard Henderson wrote: > [ CC'ed to axp-list because of general interest. ] > > On Mon, Apr 06, 1998 at 11:15:14PM -0400, Gene McCulley wrote: > > I am currently porting a large (1.6 million lines of code) application > > to the Alpha. It has worked previously with the -taso stuff, but now > > I am making it 64-bit clean and eliminating all of the sizeof(void *) > > assumptions. I am working under Digital Unix, but this step was > > necessary so that we can move to Linux/Alpha. > > > > I am getting the unaligned access messages: > > Unaligned access pid=5293 va=0x1420f365c pc=0x1207ac030 ra=0x1207abff4 inst=0xb54c0000 > > > > Is there a way to trap these in the debugger or some other way to > > facilitate finding these? > > The following will tell both Digital Unix and Linux (post 2.1.20 or so) > to deliver a SIGBUS rather than fix up the access. This makes the > problem significantly easier to debug. [...] You don't need that. The unaligned access message tells you all you need. Just start your program in gdb and set a breakpoint at the address 0x1207ac030 with (gdb) b *0x1207ac030 then run your program and it stops right where the unaligned access happens. At least this is the case under Digital Unix and I suppose Linux should do the same. Tom -------------------------------------------------------------------------- T o m L e i t n e r Dept. of Communications Graz University of Technology, e-mail : tom@finwds01.tu-graz.ac.at Inffeldgasse 12 Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe Fax : +43-316-463-697 Home page : http://wiis.tu-graz.ac.at/people/tom.html PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net -------------------------------------------------------------------------- Before we have the paperless office, we have the paperless toilet!