2

Try compiling SegViol.p with –g:

hostname% pc -g SegViol.p hostname% a.out

***a.out terminated by signal 11: segmentation violation

***Traceback being written to a.out.trace

Abort (core dumped)

hostname% more a.out.trace

***Stacktrace of a.out

***Program terminated due to segmentation violation

[3]__PC0__sigdie(0xb, 0xefffedf0, 0xefffec30, 0x0, 0x1, 0x0), at 0x12128

---- called from signal handler with signal 11 (SIGSEGV) ------

[4]ErrorInHere(), line 12 in “SegViol.p”

[5]Call2(), line 18 in "SegViol.p"

[6]Call1(), line 21 in "SegViol.p"

[7]program(), line 25 in "SegViol.p"

detaching from process 17285

The program prints the ASCII values of character variables.

If you compile some modules with –gand others without, the line numbers may not be accurate for all the routines.

16

Pascal 4.0 User’s Guide