[Oberon] PO2013 - Show Heap Blocks

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Tue Jun 16 21:14:54 CEST 2020


Addendum: Wobei der Typ Handler definiert ist als:

    TYPE Handler* = PROCEDURE(src, dst: LONGINT; s: ARRAY OF CHAR; VAR continue: BOOLEAN): INTEGER;

A sample handler procedures could look like be:

  PROCEDURE HandleRef(src, dst: LONGINT; s: ARRAY OF CHAR; VAR continue: BOOLEAN): INTEGER;
    VAR mod: Module; i: INTEGER;
  BEGIN i := 0;
    IF (dst > 0) & (dst < AllocPtr) THEN mod := root;
      WHILE (mod # NIL) & ~((mod.name[0] # 0X) & (mod.data <= dst) & (dst < mod.imp)) DO mod := mod.next END ;
      IF mod # NIL THEN (*src references mod*) INC(i); continue := FALSE; (*...output something...*) END
    END ;
    RETURN i
  END HandleRef;



More information about the Oberon mailing list