home bbs files messages ]

Just a sample of the Echomail archive

COMPOSVM:

<< oldest | < older | list | newer > | newest >> ]

 Message 263,339 of 264,034 
 =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Craig A. Berry 
 Re: cma$tis_errno_get_addr 
 15 Sep 25 22:56:04 
 
From: arne@vajhoej.dk

On 9/15/2025 10:39 PM, Craig A. Berry wrote:
> On 9/15/25 9:16 PM, Arne Vajhøj wrote:
>> On 9/15/2025 10:15 PM, Arne Vajhøj wrote:
>>> On 9/15/2025 9:49 PM, John Reagan wrote:
>>>> On 9/15/2025 9:20 PM, Arne Vajhøj wrote:
>>>>> Anybody got a description of cma$tis_errno_get_addr?
>>>
>>>> Returns the address of the thread's errno
>>>
>>> That was what I expected.
>>>
>>> But I am having problems.
>>>
>>> It actually works in C.
>>>
>>> But when I call it in Pascal, then I get the correct
>>> address but the value at the address is not correct.
>>
>> Calling decc$crtl_init does not solve the problem.
>>
> Never tried it from Pascal.  Since errno is a CRTL thing, it's not clear
> to me that it makes any sense to do so, but if you're trying to debug a
> library called from the Pascal code, maybe.

Pascal calling C++ library.

>                                             In any case the following
> are the notes I made for myself a long time ago:
>
> Get errno from VMS debugger:
>
> set image CMA$TIS_SHR
> set radix hexadecimal
> call CMA$TIS_ERRNO_GET_ADDR
> !
> ! The above returns an address
> !
> examine/long/decimal 
> !
> ! The above returns errno content.
> ! If errno content is 65535 (EVMSERR == 65535)
> ! continue your debugging session with right below
> !
> call CMA$TIS_VMSERRNO_GET_ADDR
> !
> ! The above returns an address
> !
> examine/condition 

Interesting.

The value I see is indeed 65535.

One question answered, but two new questions pop up.

1) How does the C++ library know that the main program
    is Pascal and not C (for C I get a normal errno value)?

2) The address returned by CMA$TIS_VMSERRNO_GET_ADDR
    point to another mysterious value not matching anything.

Arne

--- SoupGate-Win32 v1.05
 * Origin: you cannot sedate... all the things you hate (1:229/2)

<< oldest | < older | list | newer > | newest >> ]


(c) 1994,  bbs@darkrealms.ca