SCO Compiler/Linker Problem

Dr. T. Andrews tanner at cdis-1.UUCP
Thu Jan 11 08:01:12 AEST 1990


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



More information about the Comp.unix.xenix mailing list