The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] Disassemblers
@ 2021-06-20  1:15 Norman Wilson
  0 siblings, 0 replies; 17+ messages in thread
From: Norman Wilson @ 2021-06-20  1:15 UTC (permalink / raw)
  To: tuhs

Rob Pike:

  Although upon reflection, I think what I did was fix 'adb' and call it
  'db'. Haven't had my coffee yet this morning.

====

I don't think so.  I did quite a lot of work on adb during my
time at the Labs.  I remember clearly that it still used all
the Bournegol macros when I started; I doubt Rob would have
left that there.  (It was Rob who translated the shell
back to C, I believe.)

I got into adb because it still used ptrace and everyone else
seemed scared to touch the code to convert it to use /proc.
So I fixed that, and fixed sdb too, and finally removed
the ptrace call from the kernel.  I remember celebrating
by expunging ptrace from the UNIX Room copy of the V8
manual.  ptrace happened to occupt two facing pages, which
I glued together.

I did a lot more hacking on adb after that, ranging from
little stuff like making # a synonym for 0x in input
(so that adb's output could be picked up from the screen
and re-used as input, a principle established firmly and
correctly by Rob!) to a major restructuring to isolate
machine-dependent pieces like instruction decoding and
word formats, so that it was simpler not only to make
adb work on a new processor architecture but even to make
a sort of cross-adb that could, say, correctly interpret
a PDP-11 core image on a VAX.  (This actually mattered;
by the time I arrived Research had no PDP-11s running
general-purpose UNIX, but did have LSI-11s acting as
Datakit controllers and a standalone power-backed-up
LSI-11 that decoded the time signal from WWVB.)

I was never really happy about the restructuring; it did
more or less what I wanted but it wasn't really graceful.
And cross-adb needed a distinct binary for each target.
I had thoughts of trying to make a meta-language to
describe the target's data formats (simple except for
floating point) and how to print its instructions
(messier, but I remember being inspired by the clever
table-driven code in an disassembler Ken wrote for,
I think it was, the NS32000), so that one could load
a table from a file at startup; never had the time or
the courage to carry through on it.

Norman Wilson
Toronto ON

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [TUHS] Disassemblers
@ 2021-06-19 17:57 Noel Chiappa
  2021-06-19 18:40 ` Clem Cole
  0 siblings, 1 reply; 17+ messages in thread
From: Noel Chiappa @ 2021-06-19 17:57 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Henry Bent

    > From what I can gather the only way to reasonably examine the
    > disassembly of a program in the early days of Unix was adb. Is this
    > true?  Was there a way to easily produce a full disassembly?

'adb' is quite late. We had it on the PWB1 (V6 enhanced, basically) system at
MIT, so its roots lie before V7. (Every time I run across people who think V7
is early, I go into 'get off my lawn' mode.)

The first thing I know of that could disassemble PDP-11 code on Unix was 'db',
which dates back to V1:

  https://minnie.tuhs.org//cgi-bin/utree.pl?file=V1/man/man1/db.1

It wasn't optimal for doing disassembly, because it was non-trivial to
dump an entire object file as assembler source - but it could be done.

Later (V5 era) there was something called 'cdb', which was 'db' with
extensions to make it useful for debugging code whose source was in C:

    https://minnie.tuhs.org//cgi-bin/utree.pl?file=V4/man/man1/cdb.1

There were other non-Unix disassembler (such as DDT), also.

      Noel

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] Disassemblers
@ 2021-06-19 15:04 Henry Bent
  2021-06-19 15:54 ` Clem Cole
  0 siblings, 1 reply; 17+ messages in thread
From: Henry Bent @ 2021-06-19 15:04 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

From what I can gather the only way to reasonably examine the disassembly
of a program in the early days of Unix was adb.  Is this true?  Was there a
way to easily produce a full disassembly?  I'll confess to being fairly
ignorant of adb use since I always had dbx or the equivalent available.
The first tool I'm aware of to purposefully/primarily produce a full
listing is MIPS dis (ca. 1986?) but there must have been something before
that for other systems, no?

-Henry

[-- Attachment #2: Type: text/html, Size: 547 bytes --]

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

end of thread, other threads:[~2021-07-02 18:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-20  1:15 [TUHS] Disassemblers Norman Wilson
  -- strict thread matches above, loose matches on Subject: below --
2021-06-19 17:57 Noel Chiappa
2021-06-19 18:40 ` Clem Cole
2021-06-19 15:04 Henry Bent
2021-06-19 15:54 ` Clem Cole
2021-06-19 16:33   ` Henry Bent
2021-06-19 16:59     ` Clem Cole
2021-06-19 20:44       ` Richard Salz
2021-06-19 21:49         ` Rob Pike
2021-06-19 21:50           ` Rob Pike
2021-06-19 22:55             ` Clem Cole
2021-06-19 23:14               ` Larry McVoy
2021-06-20  1:41             ` Brantley Coile
2021-07-02  1:36       ` scj
2021-07-02 16:56         ` Paul Winalski
2021-07-02 17:45           ` Paul Winalski
2021-07-02 18:07           ` John P. Linderman

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