Xref: utzoo comp.unix.ultrix:6357 comp.sys.mips:1404 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!snorkelwacker.mit.edu!bloom-beacon!deccrl!news.crl.dec.com!shlump.nac.dec.com!mipsbx.lkg.dec.com!thomas From: thomas@mipsbx.lkg.dec.com (Matt Thomas) Newsgroups: comp.unix.ultrix,comp.sys.mips Subject: Re: How to trap unaligned accesses on Ultrix/MIPS? Message-ID: <20540@shlump.nac.dec.com> Date: 26 Feb 91 18:44:31 GMT References: <1991Feb22.154608.27095@ZYX.SE> <1991Feb25.221137.8462@jarvis.csri.toronto.edu> Sender: news@shlump.nac.dec.com Followup-To: comp.unix.ultrix Organization: Digital Equipment Lines: 24 In article <1991Feb25.221137.8462@jarvis.csri.toronto.edu> cks@hawkwind.utcs.toronto.edu (Chris Siebenmann) writes: > > Unfortunately, Ultrix currently (as far as I'm aware) provides no >support for making your programs always dump core when they do >unaligned references that the kernel has to fix up. Personally, I think >this is a gaping misfeature, and I wish DEC had fixed their kernel and >uac to support this several releases ago (maybe then vendors would stop >fixing third party software that fills up our error logs with "Fixing >up unaligned references" messages). #include #include #include syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL); Starting in ULTRIX V4.2, adding above line to your program will causes it core dump (via a bus error) when an unaligned access is trapped. Replacing the 0 by a 1 will reenable fixups. -- Matt Thomas Internet: thomas@wrl.dec.com DECnet-ULTRIX Development UUCP: ...!decwrl!thomas Digital Equipment Corporation Disclaimer: This message reflects my own Littleton, MA warped views, etc. Brought to you by Super Global Mega Corp .com