Xref: utzoo comp.unix.ultrix:6348 comp.sys.mips:1400 Path: utzoo!utgpu!news-server.csri.toronto.edu!utcs.toronto.edu!cks Newsgroups: comp.unix.ultrix,comp.sys.mips From: cks@hawkwind.utcs.toronto.edu (Chris Siebenmann) Subject: Re: How to trap unaligned accesses on Ultrix/MIPS? Message-ID: <1991Feb25.221137.8462@jarvis.csri.toronto.edu> Organization: Ziebmef home away from home References: <1991Feb22.154608.27095@ZYX.SE> Date: 26 Feb 91 03:11:37 GMT Lines: 24 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). If you have kernel source, it appears to be a relatively simple fix to always make things dump core when this happens (or to make it dump core conditional on whether or not the message is printed); see trap.c, around line 368 in the Ultrix 4.0 sources. It might be possible to binary patch a kernel to always dump core on such fixups; you'd need to NOP out a C break statement. Of course, who knows how much Ultrix software would start dumping core if you did this; patch at your own peril. -- ported program: a program which takes constant or increasing effort to port to each new machine. portable program: a program which takes less effort to port to each new machine. cks@hawkwind.utcs.toronto.edu ...!{utgpu,utzoo,watmath}!utgpu!cks Brought to you by Super Global Mega Corp .com