|
|
1.1 root 1: db/Read_me 4/2/93
2: steve's notes on db source
3:
4: A brief history:
5: db was originally written ca. 1982 (?) by Johann George for PDP-11 COHERENT.
6: It was subsequently ported to i8086, z8001, m68000, etc.
7: The source still shows the influence of these versions,
8: in particularly the segmentation for PDP-11 and segmented z8001 models.
9: It is also complicated considerably by understanding both COFF and l.out.
10:
11: The initial i386 version was by a German associate of Frank Pfeifer,
12: Bernard Waldt, Waldt Software Consulting, Germany,
13: starting from existing i8086 sources.
14: He was not an MWC employee, and apparently it never worked.
15: hal hacked on the i386 sources somewhat in 1993, cleaning up the
16: ptrace() call in the COH386 system and making db sort of work.
17:
18: By the time steve got the i386 sources, both machine-independent and
19: machine-independent sources lived in the same directory.
20: steve restored the subdirectory structure for the benefit of future ports
21: and rewrote and reorganized the source considerably; see the Changes
22: file for more details.
23:
24: In the PDP-11 machine model, the same address could reference i-space (code)
25: or d-space (data). Vestiges of this architecture are still very evident in
26: db source (as well as in the ptrace() interface), and make the source
27: confusing or wrongheaded for a flat address space machine architecture,
28: although much of this code is still necessary to support l.out.
29: In particular, a symbol has an associated segment (DSEG or ISEG,
30: or USEG for registers), but the mapping of an arbitrary address
31: to a segment can be many-one. This could be clearer in the source.
32:
33: Substantial amounts of other source cleanup remain to be done.
34: The code often assumes that the host machine object sizes are the same
35: as the target machine sizes (4 byte ints); it should instead define its
36: own target machine types, like ival_t in the compiler;
37: with a little fine-tuning of exec() and ptrace() interface,
38: this would allow remote (cross-machine) debugging.
39: The machine-independent code used to pass machine addresses in longs,
40: now it uses ADDR_T (defined in machine-dependent mdb.h).
41:
42: Future coding improvements/ideas:
43: type handling using char_t/short_t/int_t/long_t for target sizes
44: symbol lookup by value: add ordered list field to SYM?
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.