Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: paramucho@hotmail.com (paramucho)
Subject: Re: Debugging Programs under RT-11
Date: Tue, 28 May 2013 16:25:04 GMT	[thread overview]
Message-ID: <51a4d13b.59971698@nntp.aioe.org> (raw)
In-Reply-To: 51a368d5$0$32108$14726298@news.sunsite.dk

On Mon, 27 May 2013 10:05:39 -0400, "Jerome H. Fine"
<everyone@nospam.com> wrote:

>Does anyone reading this still write code to be run
>under RT-11?  When a program has a bug, what do
>you use to find the problem?  For debugging programs,
>SD: seems the most efficient way, especially when a
>Mapped Monitor is being used.  Alternatively, ODT
>(VDT when Multi-terminal Support is included in the
>RT-11 monitor) can be LINKed into the program.
>
>Recently, I have been considering enhancements to
>the SD: variant, SDHX.SYS, which would reduce
>the Low Memory required along with adding an
>additional feature which is part of Ersatz-11.
>Specifically, SET  PCLOG  ON requests the
>Ersatz-11 emulator to save the addresses of the
>last 64 instructions that were executed.  The the
>command SHOW  PCLOG displays all 64 addresses
>at the users request.
>
>I would appreciate a response from anyone still writing
>and debugging programs that run under RT-11 and
>which debug package is being used along with the
>advantages and disadvantages that have been found.

I still write and debug RT-11 programs, but mostly running under RUST,
or more recently under RTX (RUST running under RSX). I use my own
debuggers. For MACRO, I use output logging and a single breakpoint, or
wait for a memory or instruction error to trigger the debugger. I
haven't used a symbolic debugger for a long time--I have the program
source available on a different screen and read from that. Every so
often I need the link map to get a symbolic address. For C programs I
use printf almost exclusively, although my preprocessor has a feature
which allows me to log progress at the terminal very easily.

Most of my debugging is done under the V11 emulator which has a great
debugger where I can trap all kinds of behaviors. Along with WATCH it
also supports FEEL which traps when a particular location is read. A
couple of years ago I wrote a new debugger for RUST/SJ with full trace
trap support. RUST/XM has yet another debugger which runs in kernel
space--it allows ordinary system usage to continue while debugging in
user or kernel mode (although you have to be careful).

V11 and the new RUST/SJ debugger support a command history. The L
(last) and N (next) debug commands walk through the command history
(like your PCLOG).

144414  112504  movb    (r5)+,r4 | l
144412  112546  movb    (r5)+,-(sp) | l
143764  4567    jsr     r5,144412 | l
143762  103026  bcc     144040 | l
131404  4737    call    @#143762 | l
131402  261     sec      | l
131400  5001    clr     r1 | l
131376  5726    tst     (sp)+ |

I generally use an edit-compile-test loop for each bug. Hundreds of
compiles.

I rely heavily on RT-11 and RSX system call traces. The trace below
shows the RTX program VIP.SAV (think PIP.SAV) being run out of a
native RSX directory. There are both RT-11 and RSX system calls. Using
this kind of trace lets me localise bugs very quickly.

.run dl:[1,64]vir
173506  .close  chan=17
137542  .spfun  chan=17 func=777 buf=165220 wcnt=0 blk=0 crtn=0
174112  .dstat  dnam=163462=c00: retspc=163536
173534  .lookup chan=17 dblk=163462=c00:vip.sav seq=10
167330  .lookup chan=17 dblk=163510=dl:001064.dsk seq=163536
137542  .spfun  chan=17 func=1777 buf=165142 wcnt=163536 blk=163536
160202u alun    lun=20 dev=[DL]
160202u glun    lun=20 buf=145722
161216u qiow    fun=11=(fna) mod=0 lun=20 efn=41 isb=160006
                        p6=145736 nam=[DL0:001064.DIR] fid=0/0 did=4/4
137542  .spfun  chan=17 func=1777 buf=165220 wcnt=163536 blk=163536 
161216u qiow    fun=11=(fna) mod=0 lun=20 efn=41 isb=160006
                        p6=145736 nam=[DL0:VIP.SAV] fid=0/0 did=24/1
161216u qiow    fun=16=(acw) mod=0 lun=20 efn=41 isb=160006
                        p1=147174 p5=100000
161216u qiow    fun=26=(rat) mod=0 lun=20 efn=41 isb=160006
                        p1=147174 p2=151126
173566  .readw  chan=17 buf=2000 wcnt=400 crtn=0 blk=0
40       userpc 4056
42       usersp 1000
44       jsw    -ovly$
50       userto 52540
173750  .readw  chan=17 buf=1000 wcnt=25400 crtn=0 blk=1
173440  .close  chan=17
137542  .spfun  chan=17 func=777 buf=165220 wcnt=1000 blk=1000 crtn=0
161216u qiow    fun=20=(dac) mod=0 lun=20 efn=41 isb=160006
                        p1=147174
141646u gtim    buf=120266
4104    .serr
51674   .settop addr=121102
50       userto 121102
4142    .gtjb   addr=3756
44       jsw    +ttlc$
4254    .csispc (gtlin) linbuf=56576 prompt=3664 VIP>
VIP>

Ian


      parent reply	other threads:[~2013-05-28 16:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 14:05 Debugging Programs under RT-11 Jerome H. Fine
2013-05-27 18:50 ` glen herrmannsfeldt
2013-05-27 19:35   ` Jerome H. Fine
2013-05-27 21:23     ` Johnny Billquist
2013-05-28  2:06       ` Jerome H. Fine
2013-05-28  9:35         ` Johnny Billquist
2013-05-28 12:46           ` Jerome H. Fine
2013-05-28 14:33             ` Johnny Billquist
2013-05-28 16:56               ` Jerome H. Fine
2013-05-28 20:42                 ` Johnny Billquist
2013-05-29 21:15                   ` Jerome H. Fine
2013-05-30  1:29                     ` Johnny Billquist
2013-05-31 16:38                       ` paramucho
2013-05-31 17:44                         ` Johnny Billquist
2013-06-04  3:03                           ` paramucho
2013-06-04 18:57                             ` Johnny Billquist
2013-06-06 14:21                           ` Jerome H. Fine
2013-06-06 20:29                             ` Johnny Billquist
2013-05-28 16:25 ` paramucho [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox