* Debugging Programs under RT-11 @ 2013-05-27 14:05 Jerome H. Fine 2013-05-27 18:50 ` glen herrmannsfeldt 2013-05-28 16:25 ` paramucho 0 siblings, 2 replies; 19+ messages in thread From: Jerome H. Fine @ 2013-05-27 14:05 UTC (permalink / raw) 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. One big advantage of SDHX.SYS (actually all of the SD: variants) is that the user can request an automatic display of all of the register contents every time that a breakpoint occurs. The display occurs at the top of the screen each time the breakpoint takes place. The VT100 escape codes are then used to scroll down the screen and display each instruction in turn as it is about to be executed. One big disadvantage of SDHX.SYS is that it freezes the system completely, including the clock interrupts. The big advantage of VDT is that other jobs are able to continue running, but no other information is easily available when the program is stopped at a breakpoint. I would appreciate any response. Jerome Fine ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 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-28 16:25 ` paramucho 1 sibling, 1 reply; 19+ messages in thread From: glen herrmannsfeldt @ 2013-05-27 18:50 UTC (permalink / raw) In alt.sys.pdp11 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. Not recently, but when I did write and debug under RT-11 I never used a debugger. Well, it was pretty much all Fortran, and there aren't so many ways to go wrong. Most of the time when I saw the output I knew pretty much where the problem was. I still mostly don't use debuggers to debug programs, though sometimes just to find where the problem is. -- glen ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-27 18:50 ` glen herrmannsfeldt @ 2013-05-27 19:35 ` Jerome H. Fine 2013-05-27 21:23 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-05-27 19:35 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 2061 bytes --] >glen herrmannsfeldt wrote: >>In alt.sys.pdp11 Jerome H. Fine 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. >> >> > >Not recently, but when I did write and debug under >RT-11 I never used a debugger. Well, it was pretty much >all Fortran, and there aren't so many ways to go wrong. > >Most of the time when I saw the output I knew pretty much >where the problem was. I still mostly don't use debuggers >to debug programs, though sometimes just to find where the >problem is. > When I wrote Fortran programs, I rarely used a debug. About the only time it was necessary was when something really crazy was taking place. In addition, one time I was dividing two 16 bit integer values and the Fortran compiler was doing an inline divide. The first step was to place the quotient into R1 and "SXT R0". Unfortuately, I required an UNSIGNED divide and near the end of 1999, the quotient became negative due to Y2K issues. After I realized what was causing the problem, the trivial solution was to patch the SAV file and SXT R0 became CLR R0. The reason I am asking about debug utilities such as SDHX.SYS and VDT is that they each have advantages and disadvantages, SDHX.SYS has superb displays of the registers and the instructions being executed and does NOT need to be LINKed into the SAV file - but it completely freezes EVERYTHING!!!!!!!! VDT has very poor display features along with being LINKed into the SAV file, but allows other programs to continue to execute. I don't understand why DEC never managed to combine all of the good features into one package. It should be possible and I was wondering if anyone else might be interested as well. Jerome Fine [-- Attachment #2: Type: text/html, Size: 2621 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-27 19:35 ` Jerome H. Fine @ 2013-05-27 21:23 ` Johnny Billquist 2013-05-28 2:06 ` Jerome H. Fine 0 siblings, 1 reply; 19+ messages in thread From: Johnny Billquist @ 2013-05-27 21:23 UTC (permalink / raw) On 2013-05-27 21:35, Jerome H. Fine wrote: > >glen herrmannsfeldt wrote: >> >In alt.sys.pdp11 Jerome H. Fine 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. >>> >> >> Not recently, but when I did write and debug under >> RT-11 I never used a debugger. Well, it was pretty much >> all Fortran, and there aren't so many ways to go wrong. >> >> Most of the time when I saw the output I knew pretty much >> where the problem was. I still mostly don't use debuggers >> to debug programs, though sometimes just to find where the >> problem is. > When I wrote Fortran programs, I rarely used a debug. About the > only time it was necessary was when something really crazy was > taking place. In addition, one time I was dividing two 16 bit integer > values and the Fortran compiler was doing an inline divide. The > first step was to place the quotient into R1 and "SXT R0". > Unfortuately, I required an UNSIGNED divide and near the end > of 1999, the quotient became negative due to Y2K issues. After > I realized what was causing the problem, the trivial solution was > to patch the SAV file and SXT R0 became CLR R0. > > The reason I am asking about debug utilities such as SDHX.SYS > and VDT is that they each have advantages and disadvantages, > SDHX.SYS has superb displays of the registers and the instructions > being executed and does NOT need to be LINKed into the SAV > file - but it completely freezes EVERYTHING!!!!!!!! VDT has > very poor display features along with being LINKed into the SAV > file, but allows other programs to continue to execute. > > I don't understand why DEC never managed to combine all of the > good features into one package. It should be possible and I was > wondering if anyone else might be interested as well. Did the PDP-11 symbolic debugger never make it to RT-11? Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-27 21:23 ` Johnny Billquist @ 2013-05-28 2:06 ` Jerome H. Fine 2013-05-28 9:35 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-05-28 2:06 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 2355 bytes --] >Johnny Billquist wrote: > >On 2013-05-27 21:35, Jerome H. Fine wrote: > >> The reason I am asking about debug utilities such as SDHX.SYS >> and VDT is that they each have advantages and disadvantages, >> SDHX.SYS has superb displays of the registers and the instructions >> being executed and does NOT need to be LINKed into the SAV >> file - but it completely freezes EVERYTHING!!!!!!!! VDT has >> very poor display features along with being LINKed into the SAV >> file, but allows other programs to continue to execute. >> >> I don't understand why DEC never managed to combine all of the >> good features into one package. It should be possible and I was >> wondering if anyone else might be interested as well. > > Did the PDP-11 symbolic debugger never make it to RT-11? YES, it certainly did! The results are very spectacular! For Mapped RT-11 Monitors, the two choices are the SDHX.SYS and SDSX.SYS which have already been described. By combining SDHX.SYS and DBGSYM.SAV, all of the symbolic debugging is available. HOWEVER, as I have mentioned, SDHX.SYS (renamed as SDX.SYS to work under RT-11) freezes EVERYTHING including interrupts for the clock. On the other hand, I just attempted to check out VDT by starting it as a foreground job and obtaining the contents of 14,16 (vector for BPT). As per the suggestion for using ODT with device handlers, it is then possible under certain conditions (ask if you are interested) to restore the BPT vector values and execute a background program under VDT breakpoint control WITHOUT all those great features in SDHX.SYS, BUT with all other jobs and the rest of the RT-11 operating system remaining UNFROZEN!!!!!!!!!!!!!!!!!!! So IT IS POSSIBLE!!!!! AND the best aspect of starting VDT as a foreground job is that it does not need to first be LINKed into the SAV file. BUT DEC never did combine those two aspects. The question is if anyone else is actually writing and debugging any programs to be run under RT-11. Even if someone is just interested, I don't know if the effort of enhancing VDT is worth while just for myself. Does anyone else still write and debug programs using SDX.SYS, ODT or VDT under RT-11? If I have 50 more years of writing RT-11 programs, well maybe for myself. But with perhaps 10 years, ..... Jerome Fine [-- Attachment #2: Type: text/html, Size: 3115 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 2:06 ` Jerome H. Fine @ 2013-05-28 9:35 ` Johnny Billquist 2013-05-28 12:46 ` Jerome H. Fine 0 siblings, 1 reply; 19+ messages in thread From: Johnny Billquist @ 2013-05-28 9:35 UTC (permalink / raw) On 2013-05-28 04:06, Jerome H. Fine wrote: > >Johnny Billquist wrote: >> >On 2013-05-27 21:35, Jerome H. Fine wrote: >>> The reason I am asking about debug utilities such as SDHX.SYS >>> and VDT is that they each have advantages and disadvantages, >>> SDHX.SYS has superb displays of the registers and the instructions >>> being executed and does NOT need to be LINKed into the SAV >>> file - but it completely freezes EVERYTHING!!!!!!!! VDT has >>> very poor display features along with being LINKed into the SAV >>> file, but allows other programs to continue to execute. >>> >>> I don't understand why DEC never managed to combine all of the >>> good features into one package. It should be possible and I was >>> wondering if anyone else might be interested as well. >> Did the PDP-11 symbolic debugger never make it to RT-11? > YES, it certainly did! The results are very spectacular! For Mapped > RT-11 Monitors, the two choices are the SDHX.SYS and SDSX.SYS > which have already been described. By combining SDHX.SYS and > DBGSYM.SAV, all of the symbolic debugging is available. Well, my response was to the comment about features. The symbolic debugger gives you great displays of all kind of information. It does not freeze the world, it mostly stays out of the task address space, and it even understands high level languages. But that is all under RSX. Since you asked why DEC never combined all the good stuff you mention, I had to ask if the symbolic debugger never made it to RT-11, since it would seem that it was the thing you asked for. And it came from DEC. Johnny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 9:35 ` Johnny Billquist @ 2013-05-28 12:46 ` Jerome H. Fine 2013-05-28 14:33 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-05-28 12:46 UTC (permalink / raw) >Johnny Billquist wrote: > >On 2013-05-28 04:06, Jerome H. Fine wrote: > >> >Johnny Billquist wrote: >> >>> Did the PDP-11 symbolic debugger never make it to RT-11? >> >> YES, it certainly did! The results are very spectacular! For Mapped >> RT-11 Monitors, the two choices are the SDHX.SYS and SDSX.SYS >> which have already been described. By combining SDHX.SYS and >> DBGSYM.SAV, all of the symbolic debugging is available. > > Well, my response was to the comment about features. The symbolic > debugger gives you great displays of all kind of information. It does > not freeze the world, it mostly stays out of the task address space, > and it even understands high level languages. But that is all under > RSX. Since you asked why DEC never combined all the good stuff you > mention, I had to ask if the symbolic debugger never made it to RT-11, > since it would seem that it was the thing you asked for. And it came > from DEC. Yes!! The focus of your question seems a bit clearer. I never mentioned the symbolic debugging aspect available in the SD: variants under RT-11. For many users, that would be a great feature. Unfortunately, it was not available under ODT under RT-11 when I first used ODT, so I never made any use of symbolic debugging after SD: arrived. My starting point in debugging is always with the MACRO-11 listing. Once I locate an instruction which is near the bug, setting a breakpoint is easy and sufficient to start the process. I find that displaying the next instruction helps far more than anything else to verify the details associated with the MACRO-11 listing. SD: also lists instructions at any other address along with many other display options including an optional selection of the automatic update of all registers at the top of the screen display. However, the ability of VDT to support the same breakpoint capability as SD: without freezing any thing else under RT-11, including other jobs, makes the use of VDT much more helpful than SD: in many cases. What I seem to have missed is why you suggest that "the symbolic debugger .... was the thing that you asked for" since this is the very first time in our exchange that the features associated with a "symbolic debugger" may or may not have been included in the SD: variants from DEC. While I agree that having the features associated with a symbolic debugger are extremely useful and very helpful in many situations, freezing all activity on the PDP-11 when a program is stopped at a breakpoint is the major aspect and disadvantage of SD: that I would like to overcome. It is just as much of a disadvantage as every other feature that SD: supports (vs what is available at present in VDT) is an advantage including, for myself, support for a symbolic debugger within SD: (since I don't use the symbolic debugger features in any case). Since all of the features supported by both SD: and VDT obviously came from DEC in the first place, the only question is which features are supported by each of these software programs. The point I am attempting to make is not that DEC did not make certain features available at all, but that it never did combine those features in one package, in particular the ability of VDT to allow all other activity to continue while also including all or at least most of the other features which SD: supports. Have I managed to make my preference clear at this point or do you still have a question. I do appreciate the opportunity to discuss these points since it seems that very few individuals are interested. This discussion also helps me to clarify what I specifically want in an enhanced SD: and may point to other avenues to find a solution. THANK YOU!!!!!!!!!!!!!!!!!!!! Jerome Fine ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 12:46 ` Jerome H. Fine @ 2013-05-28 14:33 ` Johnny Billquist 2013-05-28 16:56 ` Jerome H. Fine 0 siblings, 1 reply; 19+ messages in thread From: Johnny Billquist @ 2013-05-28 14:33 UTC (permalink / raw) On 2013-05-28 14:46, Jerome H. Fine wrote: > >Johnny Billquist wrote: > >> >On 2013-05-28 04:06, Jerome H. Fine wrote: >> >>> >Johnny Billquist wrote: >>> >>>> Did the PDP-11 symbolic debugger never make it to RT-11? >>> >>> YES, it certainly did! The results are very spectacular! For Mapped >>> RT-11 Monitors, the two choices are the SDHX.SYS and SDSX.SYS >>> which have already been described. By combining SDHX.SYS and >>> DBGSYM.SAV, all of the symbolic debugging is available. >> >> Well, my response was to the comment about features. The symbolic >> debugger gives you great displays of all kind of information. It does >> not freeze the world, it mostly stays out of the task address space, >> and it even understands high level languages. But that is all under >> RSX. Since you asked why DEC never combined all the good stuff you >> mention, I had to ask if the symbolic debugger never made it to RT-11, >> since it would seem that it was the thing you asked for. And it came >> from DEC. > > Yes!! The focus of your question seems a bit clearer. I never > mentioned the symbolic debugging aspect available in the SD: > variants under RT-11. For many users, that would be a great > feature. Unfortunately, it was not available under ODT under > RT-11 when I first used ODT, so I never made any use of > symbolic debugging after SD: arrived. My starting point > in debugging is always with the MACRO-11 listing. Once > I locate an instruction which is near the bug, setting a > breakpoint is easy and sufficient to start the process. > > I find that displaying the next instruction helps far more than > anything else to verify the details associated with the MACRO-11 > listing. SD: also lists instructions at any other address along with > many other display options including an optional selection of the > automatic update of all registers at the top of the screen display. > > However, the ability of VDT to support the same breakpoint > capability as SD: without freezing any thing else under RT-11, > including other jobs, makes the use of VDT much more helpful > than SD: in many cases. > > What I seem to have missed is why you suggest that "the symbolic > debugger .... was the thing that you asked for" since this is the very > first time in our exchange that the features associated with a > "symbolic debugger" may or may not have been included in > the SD: variants from DEC. While I agree that having the features > associated with a symbolic debugger are extremely useful and > very helpful in many situations, freezing all activity on the PDP-11 > when a program is stopped at a breakpoint is the major aspect > and disadvantage of SD: that I would like to overcome. It is just > as much of a disadvantage as every other feature that SD: supports > (vs what is available at present in VDT) is an advantage including, > for myself, support for a symbolic debugger within SD: (since I > don't use the symbolic debugger features in any case). > > Since all of the features supported by both SD: and VDT obviously > came from DEC in the first place, the only question is which features > are supported by each of these software programs. The point I am > attempting to make is not that DEC did not make certain features > available at all, but that it never did combine those features in one > package, in particular the ability of VDT to allow all other activity > to continue while also including all or at least most of the other > features which SD: supports. > > Have I managed to make my preference clear at this point or > do you still have a question. I do appreciate the opportunity > to discuss these points since it seems that very few individuals > are interested. This discussion also helps me to clarify what > I specifically want in an enhanced SD: and may point to other > avenues to find a solution. THANK YOU!!!!!!!!!!!!!!!!!!!! I don't think you understood me. The Symbolic Debugger is a product from DEC. The various tools, debugger facilities and whatnot you mention does not appear (to me) to be the same thing as the Symbolic Debugger. See http://h18000.www1.hp.com/info/SP1278/SP1278PF.PDF for the SPD, or read http:://madame.update.uu.se/~bqt/dbgrel for the release information, or http://madame.update.uu.se/~bqt/dbghlp for the help file. Johnny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 14:33 ` Johnny Billquist @ 2013-05-28 16:56 ` Jerome H. Fine 2013-05-28 20:42 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-05-28 16:56 UTC (permalink / raw) >Johnny Billquist wrote: > I don't think you understood me. The Symbolic Debugger is a product > from DEC. The various tools, debugger facilities and whatnot you > mention does not appear (to me) to be the same thing as the Symbolic > Debugger. > > See http://h18000.www1.hp.com/info/SP1278/SP1278PF.PDF for the SPD, or > read http:://madame.update.uu.se/~bqt/dbgrel for the release > information, or http://madame.update.uu.se/~bqt/dbghlp for the help file. While the command syntax seems different, the interface seems the same as offered by DBG.MAC under RT-11. If I had access to the source code file, I would be able to confirm the possibility that the same DBG.MAC file is used for both RSX-11 and RT-11. Is there any possibility of that happening? Jerome Fine ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 16:56 ` Jerome H. Fine @ 2013-05-28 20:42 ` Johnny Billquist 2013-05-29 21:15 ` Jerome H. Fine 0 siblings, 1 reply; 19+ messages in thread From: Johnny Billquist @ 2013-05-28 20:42 UTC (permalink / raw) On 2013-05-28 18:56, Jerome H. Fine wrote: > >Johnny Billquist wrote: > >> I don't think you understood me. The Symbolic Debugger is a product >> from DEC. The various tools, debugger facilities and whatnot you >> mention does not appear (to me) to be the same thing as the Symbolic >> Debugger. >> >> See http://h18000.www1.hp.com/info/SP1278/SP1278PF.PDF for the SPD, or >> read http://madame.update.uu.se/~bqt/dbgrel for the release >> information, or http://madame.update.uu.se/~bqt/dbghlp for the help file. > > While the command syntax seems different, the interface > seems the same as offered by DBG.MAC under RT-11. > If I had access to the source code file, I would be able > to confirm the possibility that the same DBG.MAC file > is used for both RSX-11 and RT-11. Is there any > possibility of that happening? No idea. I don't have any sources. The Symbolic Debugger is a DEC product, and only comes in binary form. Also, it understands both MACRO-11, FORTRAN 77 and COBOL-81. In addition, it can perform all kind of advanced things conditionally at breakpoints or tracepoints, as well as managing breaks and traces in different overlays. (Even when those overlays are not in memory when you give the commands.) It uses a couple of hundred words of address space in your program, and the rest is outside. It's not a device, and it does not freeze anything else running. In fact, any user can run the symbolic debugger concurrently with other users without interference. Does that sound like DBG.MAC? (I do wish I could find the sources for all kind of layered products, but I have not had any luck so far.) Johnny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-28 20:42 ` Johnny Billquist @ 2013-05-29 21:15 ` Jerome H. Fine 2013-05-30 1:29 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-05-29 21:15 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 2562 bytes --] >Johnny Billquist wrote: > >On 2013-05-28 18:56, Jerome H. Fine wrote: > >> >Johnny Billquist wrote: >> >>> I don't think you understood me. The Symbolic Debugger is a product >>> from DEC. The various tools, debugger facilities and whatnot you >>> mention does not appear (to me) to be the same thing as the Symbolic >>> Debugger. >>> >>> See http://h18000.www1.hp.com/info/SP1278/SP1278PF.PDF for the SPD, or >>> read http://madame.update.uu.se/~bqt/dbgrel for the release >>> information, or http://madame.update.uu.se/~bqt/dbghlp for the help >>> file. >> >> While the command syntax seems different, the interface >> seems the same as offered by DBG.MAC under RT-11. >> If I had access to the source code file, I would be able >> to confirm the possibility that the same DBG.MAC file >> is used for both RSX-11 and RT-11. Is there any >> possibility of that happening? > > No idea. I don't have any sources. The Symbolic Debugger is a DEC > product, and only comes in binary form. Also, it understands both > MACRO-11, FORTRAN 77 and COBOL-81. In addition, it can perform all > kind of advanced things conditionally at breakpoints or tracepoints, > as well as managing breaks and traces in different overlays. (Even > when those overlays are not in memory when you give the commands.) It > uses a couple of hundred words of address space in your program, and > the rest is outside. It's not a device, and it does not freeze > anything else running. In fact, any user can run the symbolic debugger > concurrently with other users without interference. > > Does that sound like DBG.MAC? > > (I do wish I could find the sources for all kind of layered products, > but I have not had any luck so far.) If you read the RT-11 manual for the Symbolic Debugger http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA_HJ37C-TC_DBG-11_Symbolic_Debugger_Users_Guide_Aug91.pdf some of your questions might be answered. While the user interface may be different, the results certainly seem the same. In addition, Under RT-11, there is a separate program, DBGSYM.SAV, which is used to read the FOOBAR.STB file and set up the symbolic names. If I understand the RSX-11 interface, the ";A" command initiates that operation. All in all, the file DBG.MAC probably has both RSX-11 and RT-11 specific code, parts of which are completely omitted depending on which operating system is the target. DEC often seems to do this sort of thing. Can you confirm any of this? Jerome Fine [-- Attachment #2: Type: text/html, Size: 3658 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-29 21:15 ` Jerome H. Fine @ 2013-05-30 1:29 ` Johnny Billquist 2013-05-31 16:38 ` paramucho 0 siblings, 1 reply; 19+ messages in thread From: Johnny Billquist @ 2013-05-30 1:29 UTC (permalink / raw) On 2013-05-29 23:15, Jerome H. Fine wrote: > >Johnny Billquist wrote: >> >On 2013-05-28 18:56, Jerome H. Fine wrote: >>> >Johnny Billquist wrote: >>>> I don't think you understood me. The Symbolic Debugger is a product >>>> from DEC. The various tools, debugger facilities and whatnot you >>>> mention does not appear (to me) to be the same thing as the Symbolic >>>> Debugger. >>>> >>>> See http://h18000.www1.hp.com/info/SP1278/SP1278PF.PDF for the SPD, or >>>> read http://madame.update.uu.se/~bqt/dbgrel for the release >>>> information, or http://madame.update.uu.se/~bqt/dbghlp for the help >>>> file. >>> While the command syntax seems different, the interface >>> seems the same as offered by DBG.MAC under RT-11. >>> If I had access to the source code file, I would be able >>> to confirm the possibility that the same DBG.MAC file >>> is used for both RSX-11 and RT-11. Is there any >>> possibility of that happening? >> No idea. I don't have any sources. The Symbolic Debugger is a DEC >> product, and only comes in binary form. Also, it understands both >> MACRO-11, FORTRAN 77 and COBOL-81. In addition, it can perform all >> kind of advanced things conditionally at breakpoints or tracepoints, >> as well as managing breaks and traces in different overlays. (Even >> when those overlays are not in memory when you give the commands.) It >> uses a couple of hundred words of address space in your program, and >> the rest is outside. It's not a device, and it does not freeze >> anything else running. In fact, any user can run the symbolic debugger >> concurrently with other users without interference. >> >> Does that sound like DBG.MAC? >> >> (I do wish I could find the sources for all kind of layered products, >> but I have not had any luck so far.) > If you read the RT-11 manual for the Symbolic Debugger > > http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA_HJ37C-TC_DBG-11_Symbolic_Debugger_Users_Guide_Aug91.pdf > > some of your questions might be answered. While the user interface > may be different, the results certainly seem the same. Thanks. No, I had not read that manual before. But now, having done so, I dare say that there are no relationship between DBG-11 and the symbolic debugger product I'm talking about. > In addition, Under RT-11, there is a separate program, > DBGSYM.SAV, which is used to read the FOOBAR.STB > file and set up the symbolic names. If I understand the > RSX-11 interface, the ";A" command initiates that operation. Uh... No... (Where did you get that???) First of all, the symbolic debugger automatically reads in the whole .STB file when you start running the program. No action at all is required on your part. Your symbols are just there, when you start your session. (Yes, the symbolic debugger figures out the correct STB file that matches your task file.) Second, in addition to global symbols, the symbolic debugger also handles local symbols. To manage this, a symbol is actually a path, as you might have several identical symbols in different modules. So a symbol is actually all the module names and the symbol name as a long string, with each component separated by a backslash. And symbols can be expressed in relative or absolute form. Finally, if you want to specify by hand which .STB file to use, the command is "SET STB filename" If you want to define symbols of your own, the command is "DEFINE symbol = value". > All in all, the file DBG.MAC probably has both RSX-11 and > RT-11 specific code, parts of which are completely omitted > depending on which operating system is the target. DEC > often seems to do this sort of thing. > > Can you confirm any of this? I would say there seems to be no similarities between DBG-11 and the symbolic debugger. DBG-11 have about the same capabilities and syntax as ODT under RSX, with the exception that ODT does not handle symbolic names. XDT (the kernel debugger for RSX) comes even closer, as the syntax is very much the same, and XDT also can handle some symbolic address names in the kernel. The capabilities of the symbolic debugger far surpass all of this. I suspect it is not possible to get that capability under RT-11. Oh well. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-30 1:29 ` Johnny Billquist @ 2013-05-31 16:38 ` paramucho 2013-05-31 17:44 ` Johnny Billquist 0 siblings, 1 reply; 19+ messages in thread From: paramucho @ 2013-05-31 16:38 UTC (permalink / raw) On Thu, 30 May 2013 03:29:19 +0200, Johnny Billquist <bqt@softjar.se> wrote: <snip> >I would say there seems to be no similarities between DBG-11 and the >symbolic debugger. DBG-11 have about the same capabilities and syntax as >ODT under RSX, with the exception that ODT does not handle symbolic >names. XDT (the kernel debugger for RSX) comes even closer, as the >syntax is very much the same, and XDT also can handle some symbolic >address names in the kernel. XDT is based on DBG-11, the system independent PDP-11 debugger. I note that the symbolic debugger is a layered product. DECUS DDT22 seems to have some similar capabilities. >The capabilities of the symbolic debugger far surpass all of this. I >suspect it is not possible to get that capability under RT-11. Oh well. Does the RSX symbolic debugger support an instruction history? Is the debugger able to WATCH a location and trigger the debugger when the location changes? Ian ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-31 16:38 ` paramucho @ 2013-05-31 17:44 ` Johnny Billquist 2013-06-04 3:03 ` paramucho 2013-06-06 14:21 ` Jerome H. Fine 0 siblings, 2 replies; 19+ messages in thread From: Johnny Billquist @ 2013-05-31 17:44 UTC (permalink / raw) On 2013-05-31 18:38, paramucho wrote: > On Thu, 30 May 2013 03:29:19 +0200, Johnny Billquist <bqt@softjar.se> > wrote: > > <snip> > >> I would say there seems to be no similarities between DBG-11 and the >> symbolic debugger. DBG-11 have about the same capabilities and syntax as >> ODT under RSX, with the exception that ODT does not handle symbolic >> names. XDT (the kernel debugger for RSX) comes even closer, as the >> syntax is very much the same, and XDT also can handle some symbolic >> address names in the kernel. > > XDT is based on DBG-11, the system independent PDP-11 debugger. At least in spirit. I don't know about actual code. Looking at the source, the mention it's past history together with ODT. > I note that the symbolic debugger is a layered product. DECUS DDT22 > seems to have some similar capabilities. Right. There are actually several DECUS packages that are a bit closer to the symbolic debugger. I've extensively modified another one (DBG), which is my most commonly used tools these days. The things that most debuggers don't do, which the symbolic debugger do is managing breakpoints in various overlays, even if they are not currently loaded. >> The capabilities of the symbolic debugger far surpass all of this. I >> suspect it is not possible to get that capability under RT-11. Oh well. > > Does the RSX symbolic debugger support an instruction history? No. > Is the debugger able to WATCH a location and trigger the debugger when > the location changes? Partly indirectly. You can have breakpoints, which only stops the program if a value have changed, for instance. But not generic watchpoints. The syntax for setting a breakpoint is: "SET BREAK <address> WHEN <expression> DO <action>" There are some additional things you can do as well, but essentially it means you can look for changes, but you can't make it happen (reasonably) after each instruction. My modified decus debugger do support watchpoints, tracepoints, history, profiling and some other nifty stuff. However, it does not handle overlays any better than plain ODT. Johnny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 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 1 sibling, 1 reply; 19+ messages in thread From: paramucho @ 2013-06-04 3:03 UTC (permalink / raw) On Fri, 31 May 2013 19:44:58 +0200, Johnny Billquist <bqt@softjar.se> wrote: <snip> >Right. >There are actually several DECUS packages that are a bit closer to the >symbolic debugger. I've extensively modified another one (DBG), which is >my most commonly used tools these days. >The things that most debuggers don't do, which the symbolic debugger do >is managing breakpoints in various overlays, even if they are not >currently loaded. > >>> The capabilities of the symbolic debugger far surpass all of this. I >>> suspect it is not possible to get that capability under RT-11. Oh well. >> >> Does the RSX symbolic debugger support an instruction history? > >No. Oh well :-) >My modified decus debugger do support watchpoints, tracepoints, history, >profiling and some other nifty stuff. However, it does not handle >overlays any better than plain ODT. I had a look at that, and the other debuggers on your website. A lot of good code. One of them has a very clean PDP-11 instruction emulator to save time context switching back for single-step execution. I didn't manage to work out how address traps were being handled though. Looking at the trace-trap in the debuggers stuff I'm beginning to think that I made my RUST/SJ implementation more complicated than it needed to be. I often seemed to end up with wierd situations with trace traps, but perhaps that's because the debugger runs in the same CPU mode as the trace interrupt. Apropos traps, the one trap I can't seem to intercept in RTX is stack errors, which unconditionally aborts a task. I guess that makes sense for 99.99% of applications. I'd be interested in the RSX-specifics of how the two-program implementations work because I guess they represent the O/S lore on how to correctly manage memory management of other tasks and how you get the mapping information for a separate task. I'm running out of space in RTX for the RSX adaption (which was about 4kw) and there are some non-essential features that I might be able to implement using similiar techniques. I could use PLAS but I can't rely on that since it might not have been sysgen'ed into a system. Ian ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-06-04 3:03 ` paramucho @ 2013-06-04 18:57 ` Johnny Billquist 0 siblings, 0 replies; 19+ messages in thread From: Johnny Billquist @ 2013-06-04 18:57 UTC (permalink / raw) On 2013-06-04 05:03, paramucho wrote: > On Fri, 31 May 2013 19:44:58 +0200, Johnny Billquist <bqt@softjar.se> > wrote: >>>> The capabilities of the symbolic debugger far surpass all of this. I >>>> suspect it is not possible to get that capability under RT-11. Oh well. >>> >>> Does the RSX symbolic debugger support an instruction history? >> >> No. > > Oh well :-) Yeah. There is a reason I don't use it that much. While it has some cool abilities, it lacks some of the more simple features that I actually use more often. >> My modified decus debugger do support watchpoints, tracepoints, history, >> profiling and some other nifty stuff. However, it does not handle >> overlays any better than plain ODT. > > I had a look at that, and the other debuggers on your website. A lot > of good code. One of them has a very clean PDP-11 instruction emulator > to save time context switching back for single-step execution. I > didn't manage to work out how address traps were being handled though. I can go back and look at it if you really want to know. It's been a while since I played with it. > Looking at the trace-trap in the debuggers stuff I'm beginning to > think that I made my RUST/SJ implementation more complicated than it > needed to be. I often seemed to end up with wierd situations with > trace traps, but perhaps that's because the debugger runs in the same > CPU mode as the trace interrupt. > > Apropos traps, the one trap I can't seem to intercept in RTX is stack > errors, which unconditionally aborts a task. I guess that makes sense > for 99.99% of applications. RTX being your RT emulation under RSX? Yes, bad stacks can't be handled by programs under RSX. Both SST and AST vectors assume that the kernel will be able to push some data on the user stack before entry. If the user stack is broken, it just fails and aborts the task. > I'd be interested in the RSX-specifics of how the two-program > implementations work because I guess they represent the O/S lore on > how to correctly manage memory management of other tasks and how you > get the mapping information for a separate task. I'm running out of > space in RTX for the RSX adaption (which was about 4kw) and there are > some non-essential features that I might be able to implement using > similiar techniques. I could use PLAS but I can't rely on that since > it might not have been sysgen'ed into a system. The way the DECUS debugger does it actually with PLAS. It does a send reference call, which both pass a bit of data, and also pass a reference to the memory, so that the debugger can inspect and modify memory on its own. However, you can get away without that, and just design a small protocol between the two tasks using send and receive calls. It will be slower, but perfectly doable. Thus, in your actual environment, you only have a small stub service that every operation call into, and that one in turn sends like an RPC to the other task, who do the actual work, and then return a result back, for which your stub waits. But using send reference is much more efficient sometimes... Johnny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-31 17:44 ` Johnny Billquist 2013-06-04 3:03 ` paramucho @ 2013-06-06 14:21 ` Jerome H. Fine 2013-06-06 20:29 ` Johnny Billquist 1 sibling, 1 reply; 19+ messages in thread From: Jerome H. Fine @ 2013-06-06 14:21 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 4116 bytes --] >Johnny Billquist wrote: > >On 2013-05-31 18:38, paramucho wrote: > >> >On Thu, 30 May 2013 03:29:19 +0200, Johnny Billquist <bqt@softjar.se> >> wrote: >> >>> I would say there seems to be no similarities between DBG-11 and the >>> symbolic debugger. DBG-11 have about the same capabilities and >>> syntax as >>> ODT under RSX, with the exception that ODT does not handle symbolic >>> names. XDT (the kernel debugger for RSX) comes even closer, as the >>> syntax is very much the same, and XDT also can handle some symbolic >>> address names in the kernel. >> >> XDT is based on DBG-11, the system independent PDP-11 debugger. > > At least in spirit. I don't know about actual code. Looking at the > source, the mention it's past history together with ODT. I am beginning to suspect that the RSX-11 version of the Symbolic Debugger Application is based on the same starting point as the version available under RT-11, but was substantially enhanced for RSX-11 based on RSX-11 demand, interest and usage. Under RT-11, the DEC managers may have decided that there was insufficient resources (mostly available memory) to implement the additional advanced features that you describe. In particular, the variant of DBG-11 available under a Mapped RT-11 Monitor seems to have reached the maximum possible use of extended memory (8192 bytes) which would have then required too much Low Memory to include additional features such as you describe to make it worth while to use. >> I note that the symbolic debugger is a layered product. DECUS DDT22 >> seems to have some similar capabilities. > > Right. > There are actually several DECUS packages that are a bit closer to the > symbolic debugger. I've extensively modified another one (DBG), which > is my most commonly used tools these days. > The things that most debuggers don't do, which the symbolic debugger > do is managing breakpoints in various overlays, even if they are not > currently loaded. That feature would certainly be much advanced over the last RT-11 version of DBG-11, but probably not beyond the capability to implement if the required resources were made available. Probably the one most important resource needed was some imaginative use of extended memory well beyond the current concepts. I don't think that any DEC version of an RT-11 device driver uses more than 8192 bytes of extended memory. That barrier would need to be broken. >>> The capabilities of the symbolic debugger far surpass all of this. I >>> suspect it is not possible to get that capability under RT-11. Oh well. >> >> Does the RSX symbolic debugger support an instruction history? > > No. I can't see why that would be very difficult except for the buffer to hold the history. For Ersatz-11, only 64 words are used, so it it not as helpful as a larger buffer would be. But John has never focused on an extensive debug capability for Ersatz-11. For another example, Ersatz-11 supports only a single breakpoint address, although having even one is 90% of what is needed and probably takes much less effort to extend as opposed to the code needed to support even one breakpoint. >> Is the debugger able to WATCH a location and trigger the debugger when >> the location changes? > > Partly indirectly. You can have breakpoints, which only stops the > program if a value have changed, for instance. But not generic > watchpoints. > > The syntax for setting a breakpoint is: > "SET BREAK <address> WHEN <expression> DO <action>" > > There are some additional things you can do as well, but essentially > it means you can look for changes, but you can't make it happen > (reasonably) after each instruction. > > My modified decus debugger do support watchpoints, tracepoints, > history, profiling and some other nifty stuff. However, it does not > handle overlays any better than plain ODT. Did that decus debugger run only under RSX-11? What is the decus number and is a copy still available and where? And is your modified code available? Jerome Fine [-- Attachment #2: Type: text/html, Size: 5445 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-06-06 14:21 ` Jerome H. Fine @ 2013-06-06 20:29 ` Johnny Billquist 0 siblings, 0 replies; 19+ messages in thread From: Johnny Billquist @ 2013-06-06 20:29 UTC (permalink / raw) On 2013-06-06 16:21, Jerome H. Fine wrote: > >Johnny Billquist wrote: >> >On 2013-05-31 18:38, paramucho wrote: >>> Is the debugger able to WATCH a location and trigger the debugger when >>> the location changes? >> Partly indirectly. You can have breakpoints, which only stops the >> program if a value have changed, for instance. But not generic >> watchpoints. >> >> The syntax for setting a breakpoint is: >> "SET BREAK <address> WHEN <expression> DO <action>" >> >> There are some additional things you can do as well, but essentially >> it means you can look for changes, but you can't make it happen >> (reasonably) after each instruction. >> >> My modified decus debugger do support watchpoints, tracepoints, >> history, profiling and some other nifty stuff. However, it does not >> handle overlays any better than plain ODT. > Did that decus debugger run only under RSX-11? What is the > decus number and is a copy still available and where? And is > your modified code available? Only runs on RSX-11M-PLUS. You can find it under ftp://ftp.update.uu.se/pub/pdp11/rsx/tools/dbg My hacked version is available under HECnet, at MIM::DU:[DBG]. I don't remember if I made it available somewhere else right now. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Debugging Programs under RT-11 2013-05-27 14:05 Debugging Programs under RT-11 Jerome H. Fine 2013-05-27 18:50 ` glen herrmannsfeldt @ 2013-05-28 16:25 ` paramucho 1 sibling, 0 replies; 19+ messages in thread From: paramucho @ 2013-05-28 16:25 UTC (permalink / raw) 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 ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2013-06-06 20:29 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox