The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] v6 debugging
@ 2016-01-25 15:12 Noel Chiappa
  0 siblings, 0 replies; 11+ messages in thread
From: Noel Chiappa @ 2016-01-25 15:12 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 11+ messages in thread
* [TUHS] v6 debugging
@ 2016-01-25 15:12 Noel Chiappa
  2016-01-25 15:26 ` Clem Cole
  0 siblings, 1 reply; 11+ messages in thread
From: Noel Chiappa @ 2016-01-25 15:12 UTC (permalink / raw)


    > From: Clem Cole

    > 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 .. stole that from you
    > guys at MIT

Well, I certainly don't remember doing such a thing - but I should point out
that the Unix 'community' at MIT was not at all in good touch with each
other. So perhaps someone else at MIT did it? Or perhaps it was done after
I left for Proteon?

Also, the group I was in - CSR - was, during my time with them, not well
connected to other Unix users outside MIT. So even the things we _did_ do seem
not to have made it to many (any?) people. I'm not sure why this was:
probably, since we were working exclusively on early TCP/IP stuff, we were
mostly in touch with other networking people.

The disconnect to the rest of MIT may have been because, in our case, the
technical community at Tech Square didn't have good contacts with the rest of
campus; we were kind of self-sufficient. The AI Lab people had some contacts
with the Plasma fusion group, and later the EE department on campus, but CSR
(and maybe all of LCS - I'm not sure, the groups in LCS were pretty isolated
from each other) didn't.

Also, Tech Sq was mostly about PDP-10's - initially running ITS, later TWENEX
- and only a couple of smaller groups ran Unix. The DSSR group had an 11/70,
and we were quite close to them, but AFAIK we were the only two groups in Tech
Sq running Unix. I don't think anyone else at MIT had a PDP-10, until the EE
department on campus got an TWENEX machine, so there wasn't really anyone on
campus for most of Tech Sq to interact with.

	Noel


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [TUHS] v6 debugging
@ 2016-01-23 18:03 Noel Chiappa
  2016-01-23 18:42 ` Will Senn
  0 siblings, 1 reply; 11+ messages in thread
From: Noel Chiappa @ 2016-01-23 18:03 UTC (permalink / raw)


    > From: Will Senn

    > I have cdb .. How do I exit it. %, CTRL-C, CTRL-D, CTRL-Z, Break,
    > CTRL-Break, and so on just result in a ? being displayed.

CTL-D (EOF on input) works for me? Or maybe the version I have (it was a
binary only that came off the Shoppa disks, IIRC) is slightly different from
the one you have, and that only works in this version (which has a number of
extensions).

I don't think I ever found any other way to exit it. Although looking at the
code, it seems like probably the only way is to generate a 'quit with core
dump' interrupt - I forget what character that is in standard V6.

	Noel


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [TUHS] v6 debugging
@ 2016-01-23 17:18 Noel Chiappa
  2016-01-23 17:38 ` Will Senn
  0 siblings, 1 reply; 11+ messages in thread
From: Noel Chiappa @ 2016-01-23 17:18 UTC (permalink / raw)


    > From: Will Senn

    > How did folks debug assembly routines in Unix v6, back in the day?

There are three different questions here, although you may not realize it:

 - How did folks debug assembly routines in user programs in Unix v6
 - How did folks debug assembly routines in the kernel in Unix v6
 - How did folks debug assembly routines in PDP-11 standalone code created
   with Unix v6

I did all three, and I used different methods for each.

For user code, there was no source-level debugger, so debugging C programs
and debugging code written in assembler were the same thing. I used 'adb'
(which is, stricly speaking, slightly post-V6 - our system at MIT was
actually sort of an early PWB clone), but V6 itself provides 'db' (and also,
IIRC, 'cdb'); all three are very similar.

For standalone code (in my case, a packet switch that ran on PDP-11's), I
used a version of DDT that was linked in with the rest of the code. The
original version was one in MACRO-11 which I inherited from Jim Mathis at
SRI, but I eventually re-wrote it in portable C, and it was used on the 68K,
uVax and 29K.

For kernel assembler code... I can't remember what I did! Although I wrote a
fair amount of it (I modified m45.s very extensively, to work with the Able
ENABLE card), so I must have done _something_, but I have no idea what. In
theory I could have linked DDT in with the kernel, but I don't think I ever
did so?

Recently I was debugging some kernel code (the splice() system call we were
discussing here), and I debugged it using... printf()'s! It was written in C,
but I don't really differentiate between debugging C code, and assembler.


    > 2. No map file created by ld.

LD normally includes a symbol table in the output file, which 'nm' can dump.

    > 3. No debugger that I can find.

See above.

    > My workarounds include using OD to view the generated machine code

Use db/cdb/adb if you want to look at compiled code. Also, for 'cc', use the
-S flag.

	Noel


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [TUHS] v6 debugging
@ 2016-01-23 16:58 Will Senn
  2016-01-23 17:25 ` Brantley Coile
  2016-01-23 17:30 ` Clem Cole
  0 siblings, 2 replies; 11+ messages in thread
From: Will Senn @ 2016-01-23 16:58 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-01-25 15:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 15:12 [TUHS] v6 debugging Noel Chiappa
  -- strict thread matches above, loose matches on Subject: below --
2016-01-25 15:12 Noel Chiappa
2016-01-25 15:26 ` Clem Cole
2016-01-23 18:03 Noel Chiappa
2016-01-23 18:42 ` Will Senn
2016-01-23 17:18 Noel Chiappa
2016-01-23 17:38 ` Will Senn
2016-01-23 16:58 Will Senn
2016-01-23 17:25 ` Brantley Coile
2016-01-23 17:30 ` Clem Cole
2016-01-23 17:39   ` Clem Cole

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).