From mboxrd@z Thu Jan 1 00:00:00 1970 From: brantleycoile@me.com (Brantley Coile) Date: Sat, 23 Jan 2016 12:25:21 -0500 Subject: [TUHS] v6 debugging In-Reply-To: <56A3B137.80505@gmail.com> References: <56A3B137.80505@gmail.com> Message-ID: <18C17F2C-480D-425B-8CCD-A007FDE23BDB@me.com> I had a pdp-11/73 on which I ran 7th Edition. I debugged with print’s out the console. Usually I had a subroutine that would dump the registers including the PC, so I knew where it was. I used adb to get the absolute addresses. The ’73 also had a very simple debugger, ODT, built into the microcode. I never used it much, preferring to use printf in the C code and puts, puthex and snap in the assembler code. I still use this technique working with our Plan 9 system today. Brantley > On Jan 23, 2016, at 11:58 AM, Will Senn wrote: > > All, > > I'm finally returning to my study of v6 after digging a bit further into assembly language and "other" pdp-11 operating systems. I even managed to get hello, world working in assembly in v6 and interestingly enough, I actually see how it works... for the most part :). Mini-note here: > > http://decuser.blogspot.com/2016/01/hello-world-in-assembly-on-research.html > > My question for y'all today is as follows (asked previously with a much larger gap in understanding): > > How did folks debug assembly routines in Unix v6, back in the day? > > I realize that most folks didn't do assembly, but some did and I'm curious what their approach might have been. > > After having worked with RT-11 for a bit, I can see how I might develop using RT-11 and then "port" a program across, but that seems less than ideal. Here is my short list of missing features as I see them: > > 1. No listing file/cross reference list created by as. > 2. No map file created by ld. > 3. No debugger that I can find. > 4. This is not a missing feature, but it deserves inclusion in the list, the command as has possibly the most terse error messages I have ever seen - B 12? Really? Thankfully, the awesome man command comes to the rescue with the list of error codes. > > My workarounds include using OD to view the generated machine code and adding mesg calls. > > Thoughts? > > Will