The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: clemc@ccc.com (Clem Cole)
Subject: [TUHS] v6 debugging
Date: Sat, 23 Jan 2016 12:30:23 -0500	[thread overview]
Message-ID: <CAC20D2N39YsNWsh05CacBt9KR6xGw5Ueb1nGP4wxzBtyHZHuAQ@mail.gmail.com> (raw)
In-Reply-To: <56A3B137.80505@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4018 bytes --]

below...

On Sat, Jan 23, 2016 at 11:58 AM, Will Senn <will.senn at gmail.com> 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?
>

​3 questions here... how did you debug the pre-boot world (aka standalone
system), how to debug the kernel itself and a user program.

​
​Couple of them that I used were:


   1. T.lights&switches in the PMS notation (ie. the front console of the
   processor) - very helpful for kernel debugging.  In fact, certain patterns
   were definitely recognizable.   Plus people wrote programs the ran specific
   patterns in the console during certain times like the idle loop.  For the
   11 this was definitely used to debug the preboot world but it helped on the
   kernel (see below)
   2. printf or equiv
   3. a debugger when possible (adb came from AT&T, there is a ddt clone on
   one of the USENIX tapes - which I liked better and IIRC adb is not around
   with v5).  When I was mostly using v6, we used the ddt program, because I
   was also doing PDP-10 and a little VMS programming at CMU.   When I left
   CMU,went the V7 and later BSD 4.x and became pretty much 100% Unix, the ddt
   program had issues including no Vax port, so instead of fixing it, I learn
   adb and never went back.


In fact to help debug the kernel, we even put adb into the core resident
port of V7 which was tricky - Noel I seem to remember we (probably Steve
Zimmerman or maybe Geoff Peck) stole that from you guys at MIT (Steve
definitely spliced adb into the Masscomp kernel say in '84ish.  But I
remember having had something before that.

Clem

Side bar --- most of the Masscomp HW team came from the 780, 750 or 11/34
teams at DEC.   Dave Cane (Mr. 750), was the HW lead.   I remember a big
argument at Masscomp because the SW team wanted a real console at least as
a option and Dave hated them (for system debugging).  The best we ever got
was a set of macros for a logic analyzer hanging off of system in Eric
Finger's office.






>
> I realize that most folks didn't do assembly, but some did and I'm curious
> what their approach might have been.
>
​Use the USENIX Macro-11 assembler clone.

Funny, we were talking about this at lunch just yesterday!!  Later with the
Vax, post DEC putting the Fortran on BSD, ​you had the VMS linker on BSD.
Its still there and works.




>
> 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.
>
​Check the USENIX tapes​




> 2. No map file created by ld.
>
​Yup - I never had one for the 11.

I seem to remember somebody (* Goble at Purdue I think) hacked a ld to
generate them.   Check USENIX and Purdue tools.   George's Microprocessor
tools for the Z80, 8080, 6800, 6502 etc... had an ld that did just this.



> 3. No debugger that I can find.
>
​From research, until V7 correct.  But check the USENIX tapes, ​Harvard, CU
or Columbia did a ddt clone that was pretty good.



> 4. This is not a missing feature, but it deserves inclusion in the list,
> the command as has possibly the most terse error messages

​No ed(1) has beats it.   You just get a ? printed.   Google "Brian
Kernightan's dashboard"  ​


​Clem​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20160123/24561e77/attachment.html>


  parent reply	other threads:[~2016-01-23 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 16:58 Will Senn
2016-01-23 17:25 ` Brantley Coile
2016-01-23 17:30 ` Clem Cole [this message]
2016-01-23 17:39   ` Clem Cole
2016-01-23 17:18 Noel Chiappa
2016-01-23 17:38 ` Will Senn
2016-01-23 18:03 Noel Chiappa
2016-01-23 18:42 ` Will Senn
2016-01-25 15:12 Noel Chiappa
2016-01-25 15:12 Noel Chiappa
2016-01-25 15:26 ` Clem Cole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC20D2N39YsNWsh05CacBt9KR6xGw5Ueb1nGP4wxzBtyHZHuAQ@mail.gmail.com \
    --to=clemc@ccc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).