*/
Do you receive the Programmer's Heaven newsletter? If not, why not subscribe?
*/

View \TESTPMD.PAS

Borland Pascal Debug Kit 1.10b by NederWare

Submitted By: Unknown
Rating: (Not rated) (Rate It)


{ Created: 1993-12-01

Program to test the Post Mortem Debugger

}



{$Q+}
program TestPMD;

uses BBError,
     Objects, ObjMemory,
     {$IFDEF Windows}
     WinCrt,
     {$ENDIF}
     PMD;

type
  types = (test1, test2, test3);


procedure GenerateError(var f : text; e: types);

  procedure InSide(o : TObjMemory);
  var
    w : word;
    d : word;
  begin
    w := 0;
    w := w - 1;
  end;

begin
  InSide(GetObjMemory(100, 0, memfAll)^);
end;


var
  f : text;
begin
{ display information about this program }
  writeln('Post Mortem Debugger tester.');
  writeln('If this program is compiled with debug info on,');
  writeln('see TESTPMD.LOG after this program halts.');

{ initialize log file unit }
  InitBBError('TESTPMD.LOG', TRUE);

{ initialize memory handling unit }
  InitObjMemory;

{ initialize PMD with symbolic stack dump and data segment dump }
  InitPMD(dfStandard);

{ open a text file, nice in symbolic stack dump and dseg dump }
  Assign(f, 'TESTPMD.PAS');
  Reset(f);

{ generate the error }
  GenerateError(f, test2);

{ we don't need to clean up of course, because we will never reach this... }
end.

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.