Examine Pascal Variant record in debug

OpenVMS x86 native compilers, cross compilers news and questions.
Post Reply

Topic author
rodprince
Active Contributor
Posts: 31
Joined: Mon Aug 14, 2023 6:00 pm
Reputation: 0
Status: Offline

Examine Pascal Variant record in debug

Post by rodprince » Mon Dec 09, 2024 4:09 pm

Recently started testing the latest pascal release (VSI Pascal x86-64 V6.4-147 (GEM 50YAG)) on OpenVMS x86_64 V9.2-3

First, I want to say things are starting to looking very promising. With that said, I have noticed an issue when attempting to examine a pascal variant record in the debugger.

If the variant record support falls into the schema issues mentioned in the release notes, then please ignore this.

Code: Select all

program test2(input, output);

type
  device_type_def = (device_a, device_b);

  device_entry_def = record
    case device_type : device_type_def of
      device_a : ( field_1    : packed array [1..6] of char;
                   field_2    : integer );

      device_b : ( );
      end;

  device_array_def = array [1..16] of device_entry_def;

procedure add_device( var device : device_array_def;
                          idx    : integer );

begin
  device[idx].field_1 := '123456';
  device[idx].field_2 := idx;
end;


var
  devices : device_array_def := zero;

begin
  add_device( devices, 1);
end.
The sample is built with the following:

$pas/noopt/debug test2
$link/debug test2

When you run it in debug mode, do the following:

1) set break add_device
2) go
3) set mode screen (first error will appear)

%DEBUG-W-SCRNOSRCLIN, No source line for address: 0000000080000004

4) step, and the actual source code will appear.

5) examine device

%DEBUG-E-NOSYMBOL, symbol 'DEVICE' is not in the symbol table

The fact that device is not in the symbol table is the real issue.

Rod


jreagan
VSI Expert
Master
Posts: 228
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: Examine Pascal Variant record in debug

Post by jreagan » Mon Dec 09, 2024 6:51 pm

The DWARF tags for Pascal variants are currently not in the LLVM that use are using. We do have it on the list to add it (and to see if the latest LLVM has it from some other update).

I'll bump it up on our list.

Post Reply