Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!crdgw1!ge-dab!peora!ucf-cs!ki4pv!cdis-1!tanner From: tanner@cdis-1.UUCP (Dr. T. Andrews) Newsgroups: comp.unix.xenix Subject: Re: SCO Compiler/Linker Problem Summary: problem is really with "adb" Message-ID: <000004D@cdis-1.UUCP> Date: 10 Jan 90 21:01:12 GMT References: <278@milhow1.UU.NET> Reply-To: tanner@cdis-1.UUCP (Dr. T. Andrews) Organization: CDI-DLD Lines: 19 When you say that the variable "can't be accessed correctly", you mean that it can not be displayed correctly by adb. You can work around the problem by asking adb for a long-word display starting two bytes before __argc and ignoring the low-order part of the result. Your program DOES correctly access the data. It is hard to verify this with "adb" due to the bug. Problem appears to be that ptrace(2) allows unaligned access -- and "adb" is simply hoping that there will be sufficient bytes after the required ones that ptrace(2) won't fail. Of course, as you have discovered, this is not always true. This is a known bug in "adb"; my original report of it (with a small demo) is dated 01-Jul-88 under the name "pfc217.c". You don't need "large" model or the funny external if you just sbrk() a block of memory. -- {attctc gatech!uflorida}!ki4pv!cdis-1!tanner {bpa uunet}!cdin-1!cdis-1!tanner