From: hobbs@steven.zko.dec.com (Steven Hobbs)
Subject: Re: Is ladebug sane?!
Date: 1998/01/29 [thread overview]
Message-ID: <6aq5c9$7in@usenet.pa.dec.com> (raw)
In-Reply-To: 34CF46A9.E1FE002B@cgocable.net
In article <34CF46A9.E1FE002B@cgocable.net>, Marc Lepage
<mlepage@cgocable.net> writes:
..
[Discussion that includes DEC ladebug printing a "short" parameter as
having value 1857749023, which clearly would not fit into a 2 byte "short".]
..
>But I'm still curious... what are the restrictions on the upper bytes
>when a short is placed on the stack?
>
The restrictions are described in the Digital Unix document entitled
"Calling Standard for Alpha Systems", Part Number AA-PY8AC-TE. Section
4.1.5 is entitled "Unused Bits in Passed Data" and this section requires
that a "short" parameter, passed in either a register or memory, must
be extended to have 64 valid data bits. The code generated by the
compilers assume that this Calling Standard is obeyed. Software which
does not follow the Calling Standard may produce undefined results when
it is linked with code that assumes the Calling Standard is followed.
When the debugger printed the 1857749023 as the value of a "short"
variable, it was the result of a bug caused by the third party code not
following the Calling Standard. Fix this bug and the code will run better.
If ladebug only printed the bottom 2 bytes of a "short" register then
this particular bug would be much more difficult to find. (On the other
hand, an useful extension to ladebug would be the addition of a warning
message everytime ladebug accessed a user varible the contained an
out-of-range value.)
prev parent reply other threads:[~1998-01-29 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-20 5:00 Is ladebug sane?! Marc Lepage
1998-01-27 5:00 ` John Hascall
1998-01-27 5:00 ` Jeff Diewald
1998-01-28 5:00 ` Marc Lepage
1998-01-29 5:00 ` Steven Hobbs [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox