acidpaper.ms 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. .TL
  2. Acid: A Debugger Built From A Language
  3. .AU
  4. .I "Phil Winterbottom"
  5. .AI
  6. .I "Lucent Technologies Inc"
  7. .AB
  8. .FS
  9. \l'1i'
  10. .br
  11. Originally appeared in
  12. .I
  13. Proc. of the Winter 1994 USENIX Conf.,
  14. .R
  15. pp. 211-222,
  16. San Francisco, CA;
  17. and subsequently in the
  18. .I "Plan 9 Programmer's Manual, Volume 2 (Second Edition)" .
  19. .FE
  20. Acid is an unusual source-level symbolic debugger for Plan 9. It is implemented
  21. as a language interpreter with specialized primitives that provide
  22. debugger support. Programs written in the language manipulate
  23. one or more target processes; variables in the language represent the
  24. symbols, state, and resources of those processes.
  25. This structure allows complex
  26. interaction between the debugger and the target program and
  27. provides a convenient method of parameterizing differences between
  28. machine architectures.
  29. Although some effort is required to learn
  30. the debugging language, the richness and flexibility of the
  31. debugging environment encourages new ways of reasoning about the way
  32. programs run and the conditions under which they fail.
  33. .AE
  34. .NH
  35. Introduction
  36. .PP
  37. The size and complexity
  38. of programs have increased in proportion to processor speed and memory but
  39. the interface between debugger and programmer has changed little.
  40. Graphical user interfaces have eased some of the tedious
  41. aspects of the interaction. A graphical interface is a convenient
  42. means for navigating through source and data structures but provides
  43. little benefit for process control.
  44. The introduction of a new concurrent language, Alef [Win93], emphasized the
  45. inadequacies of the existing Plan 9 [Pike90] debugger
  46. .I db ,
  47. a distant relative of
  48. .I adb ,
  49. and made it clear that a new debugger was required.
  50. .PP
  51. Current debuggers like
  52. .I dbx ,
  53. .I sdb ,
  54. and
  55. .I gdb
  56. are limited to answering only the questions their authors
  57. envisage. As a result, they supply a plethora
  58. of specialized commands, each attempting to anticipate
  59. a specific question a user may ask.
  60. When a debugging situation arises that is beyond the scope
  61. of the command set, the tool is useless.
  62. Further,
  63. it is often tedious or impossible to reproduce an anomalous state
  64. of the program, especially when
  65. the state is embedded in the program's data structures.
  66. .PP
  67. Acid applies some ideas found in CAD software used for
  68. hardware test and simulation.
  69. It is based on the notion that the state and resources of a program
  70. are best represented and manipulated by a language. The state and resources,
  71. such as memory, registers, variables, type information and source code
  72. are represented by variables in the language.
  73. Expressions provide a computation mechanism and control
  74. statements allow repetitive or selective interpretation based
  75. on the result of expression evaluation.
  76. The heart of the Acid debugger is an interpreter for a small typeless
  77. language whose operators mirror the operations
  78. of C and Alef, which in turn correspond well to the basic operations of
  79. the machine. The interpreter itself knows nothing of the underlying
  80. hardware; it deals with the program state and resources
  81. in the abstract.
  82. Fundamental routines to control
  83. processes, read files, and interface to the system are implemented
  84. as builtin functions available to the interpreter.
  85. The actual debugger functionality is coded
  86. in Acid; commands are implemented as Acid functions.
  87. .PP
  88. This language-based approach has several advantages.
  89. Most importantly, programs written in Acid, including most of the
  90. debugger itself, are inherently portable.
  91. Furthermore, Acid avoids the limitations other debuggers impose when
  92. debugging parallel programs. Instead of embedding a fixed
  93. process model in the debugger, Acid allows the
  94. programmer to adapt the debugger to handle an
  95. arbitrary process partitioning or program structure.
  96. The ability to
  97. interact dynamically with an executing process provides clear advantages
  98. over debuggers constrained to probe a static image.
  99. Finally, the Acid language is a powerful vehicle for expressing
  100. assertions about logic, process state, and the contents of data structures.
  101. When combined with dynamic interaction it allows a
  102. limited form of automated program verification without requiring
  103. modification or recompilation of the source code.
  104. The language is also an
  105. excellent vehicle for preserving a test suite for later regression testing.
  106. .PP
  107. The debugger may be customized by its users; standard
  108. functions may be modified or extended to suit a particular application
  109. or preference.
  110. For example, the kernel developers in our group require a
  111. command set supporting assembler-level debugging while the application
  112. programmers prefer source-level functionality.
  113. Although the default library is biased toward assembler-level debugging,
  114. it is easily modified to provide a convenient source-level interface.
  115. The debugger itself does not change; the user combines primitives
  116. and existing Acid functions in different ways to
  117. implement the desired interface.
  118. .NH
  119. Related Work
  120. .PP
  121. DUEL [Gol93], an extension to
  122. .I gdb
  123. [Stal91], proposes using a high level expression evaluator to solve
  124. some of these problems. The evaluator provides iterators to loop over data
  125. structures and conditionals to control evaluation of expressions.
  126. The author shows that complex state queries can be formulated
  127. by combining concise expressions but this only addresses part of the problem.
  128. A program is a dynamic entity; questions asked when the program is in
  129. a static state are meaningful only after the program has been `caught' in
  130. that state. The framework for manipulating the program is still as
  131. primitive as the underlying debugger. While DUEL provides a means to
  132. probe data structures it entirely neglects the most beneficial aspect
  133. of debugging languages: the ability to control processes. Acid is structured
  134. around a thread of control that passes between the interpreter and the
  135. target program.
  136. .PP
  137. The NeD debugger [May92] is a set of extensions to TCL [Ous90] that provide
  138. debugging primitives. The resulting language, NeDtcl, is used to implement
  139. a portable interface between a conventional debugger, pdb [May90], and
  140. a server that executes NeDtcl programs operating on the target program.
  141. Execution of the NeDtcl programs implements the debugging primitives
  142. that pdb expects.
  143. NeD is targeted at multi-process debugging across a network,
  144. and proves the flexibility of a language as a means of
  145. communication between debugging tools. Whereas NeD provides an interface
  146. between a conventional debugger and the process it debugs, Acid is the
  147. debugger itself. While NeD has some of the ideas
  148. found in Acid it is targeted toward a different purpose. Acid seeks to
  149. integrate the manipulation of a program's resources into the debugger
  150. while NeD provides a flexible interconnect between components of
  151. the debugging environment. The choice of TCL is appropriate for its use
  152. in NeD but is not suitable for Acid. Acid relies on the coupling of the type
  153. system with expression evaluation, which are the root of its design,
  154. to provide the debugging primitives.
  155. .PP
  156. Dalek [Ols90] is an event based language extension to gdb. State transitions
  157. in the target program cause events to be queued for processing by the
  158. debugging language.
  159. .PP
  160. Acid has many of the advantages of same process or
  161. .I local
  162. .I agent
  163. debuggers, like Parasight [Aral], without the need for dynamic linking or
  164. shared memory.
  165. Acid improves on the ideas of these other systems by completely integrating
  166. all aspects of the debugging process into the language environment. Of
  167. particular importance is the relationship between Acid variables,
  168. program symbols, source code, registers and type information. This
  169. integration is made possible by the design of the Acid language.
  170. .PP
  171. Interpreted languages such as Lisp and Smalltalk are able to provide
  172. richer debugging environments through more complete information than
  173. their compiled counterparts. Acid is a means to gather and represent
  174. similar information about compiled programs through cooperation
  175. with the compilation tools and library implementers.
  176. .NH
  177. Acid the Language
  178. .PP
  179. Acid is a small interpreted language targeted to its debugging task.
  180. It focuses on representing program state and addressing data rather than
  181. expressing complex computations. Program state is
  182. .I addressable
  183. from an Acid program.
  184. In addition to parsing and executing expressions and providing
  185. an architecture-independent interface to the target process,
  186. the interpreter supplies a mark-and-scan garbage collector
  187. to manage storage.
  188. .PP
  189. Every Acid session begins with the loading of the Acid libraries.
  190. These libraries contain functions, written in Acid, that provide
  191. a standard debugging environment including breakpoint management,
  192. stepping by instruction or statement, stack tracing, and
  193. access to variables, memory, and registers.
  194. The library contains 600 lines of Acid code and provides
  195. functionality similar to
  196. .I dbx .
  197. Following the loading of the system library, Acid loads
  198. user-specified libraries; this load sequence allows the
  199. user to augment or override the standard commands
  200. to customize the debugging environment. When all libraries
  201. are loaded, Acid issues an interactive prompt and begins
  202. evaluating expressions entered by the user. The Acid `commands'
  203. are actually invocations of builtin primitives or previously defined
  204. Acid functions. Acid evaluates each expression as it is entered and
  205. prints the result.
  206. .NH
  207. Types and Variables
  208. .PP
  209. Acid variables are of four basic types:
  210. .I integer ,
  211. .I string ,
  212. .I float ,
  213. and
  214. .I list .
  215. The type of a variable is inferred by the type of the right-hand side of
  216. an assignment expression.
  217. Many of the operators can be applied to more than
  218. one type; for these operators the action of the operator is determined
  219. by the type of its operands.
  220. For example,
  221. the
  222. .CW +
  223. operator adds
  224. .I integer
  225. and
  226. .I float
  227. operands, and concatenates
  228. .I string
  229. and
  230. .I list
  231. operands.
  232. Lists are the only complex type in Acid; there are no arrays, structures
  233. or pointers. Operators provide
  234. .CW head ,
  235. .CW tail ,
  236. .CW append
  237. and
  238. .CW delete
  239. operations.
  240. Lists can also be indexed like arrays.
  241. .PP
  242. Acid has two levels of scope: global and local.
  243. Function parameters and variables declared in a function body
  244. using the
  245. .CW local
  246. keyword are created at entry to the function and
  247. exist for the lifetime of a function.
  248. Global variables are created by assignment and need not be declared.
  249. All variables and functions in the program
  250. being debugged are entered in the Acid symbol table as global
  251. variables during Acid initialization.
  252. Conflicting variable names are resolved by prefixing enough `$' characters
  253. to make them unique.
  254. Syntactically, Acid variables and target program
  255. symbols are referenced identically.
  256. However, the variables are managed differently in the Acid
  257. symbol table and the user must be aware of this distinction.
  258. The value of an Acid variable is stored in the symbol
  259. table; a reference returns the value.
  260. The symbol table entry for a variable or function in the target
  261. program contains the address of that symbol in the image
  262. of the program. Thus, the value of a program variable is
  263. accessed by indirect reference through the Acid
  264. variable that has the same name; the value of an Acid variable is the
  265. address of the corresponding program variable.
  266. .NH
  267. Control Flow
  268. .PP
  269. The
  270. .CW while
  271. and
  272. .CW loop
  273. statements implement looping.
  274. The former
  275. is similar to the same statement in C.
  276. The latter evaluates starting and ending expressions yielding
  277. integers and iterates while an incrementing loop index
  278. is within the bounds of those expressions.
  279. .P1
  280. acid: i = 0; loop 1,5 do print(i=i+1)
  281. 0x00000001
  282. 0x00000002
  283. 0x00000003
  284. 0x00000004
  285. 0x00000005
  286. acid:
  287. .P2
  288. The traditional
  289. .CW if-then-else
  290. statement implements conditional execution.
  291. .NH
  292. Addressing
  293. .PP
  294. Two indirection operators allow Acid to access values in
  295. the program being debugged.
  296. The
  297. .CW *
  298. operator fetches a value from the memory image of an
  299. executing process;
  300. the
  301. .CW @
  302. operator fetches a value from the text file of the process.
  303. When either operator appears on the left side of an assignment, the value
  304. is written rather than read.
  305. .PP
  306. The indirection operator must know the size of the object
  307. referenced by a variable.
  308. The Plan 9 compilers neglect to include this
  309. information in the program symbol table, so Acid cannot
  310. derive this information implicitly.
  311. Instead Acid variables have formats.
  312. The format is a code
  313. letter specifying the printing style and the effect of some of the
  314. operators on that variable.
  315. The indirection operators look at the format code to determine the
  316. number of bytes to read or write.
  317. The format codes are derived from the format letters used by
  318. .I db .
  319. By default, symbol table variables and numeric constants
  320. are assigned the format code
  321. .CW 'X'
  322. which specifies 32-bit hexadecimal.
  323. Printing such a variable yields output of the form
  324. .CW 0x00123456 .
  325. An indirect reference through the variable fetches 32 bits
  326. of data at the address indicated by the variable.
  327. Other formats specify various data types, for example
  328. .CW i
  329. an instruction,
  330. .CW D
  331. a signed 32 bit decimal,
  332. .CW s
  333. a null-terminated string.
  334. The
  335. .CW fmt
  336. function
  337. allows the user to change the format code of a variable
  338. to control the printing format and
  339. operator side effects.
  340. This function evaluates the expression supplied as the first
  341. argument, attaches the format code supplied as the second
  342. argument to the result and returns that value.
  343. If the result is assigned to a variable,
  344. the new format code applies to
  345. that variable. For convenience, Acid provides the
  346. .CW \e
  347. operator as a shorthand infix form of
  348. .CW fmt .
  349. For example:
  350. .P1
  351. acid: x=10
  352. acid: x // print x in hex
  353. 0x0000000a
  354. acid: x = fmt(x, 'D') // make x type decimal
  355. acid: print(x, fmt(x, 'X'), x\eX) // print x in decimal & hex
  356. 10 0x0000000a 0x0000000a
  357. acid: x // print x in decimal
  358. 10
  359. acid: x\eo // print x in octal
  360. 000000000012
  361. .P2
  362. The
  363. .CW ++
  364. and
  365. .CW --
  366. operators increment or decrement a variable by an amount
  367. determined by its format code. Some formats imply a non-fixed size.
  368. For example, the
  369. .CW i
  370. format code disassembles an instruction into a string.
  371. On a 68020, which has variable length instructions:
  372. .P1
  373. acid: p=main\ei // p=addr(main), type INST
  374. acid: loop 1,5 do print(p\eX, @p++) // disassemble 5 instr's
  375. 0x0000222e LEA 0xffffe948(A7),A7
  376. 0x00002232 MOVL s+0x4(A7),A2
  377. 0x00002236 PEA 0x2f($0)
  378. 0x0000223a MOVL A2,-(A7)
  379. 0x0000223c BSR utfrrune
  380. acid:
  381. .P2
  382. Here,
  383. .CW main
  384. is the address of the function of the same name in the program under test.
  385. The loop retrieves the five instructions beginning at that address and
  386. then prints the address and the assembly language representation of each.
  387. Notice that the stride of the increment operator varies with the size of
  388. the instruction: the
  389. .CW MOVL
  390. at
  391. .CW 0x0000223a
  392. is a two byte instruction while all others are four bytes long.
  393. .PP
  394. Registers are treated as normal program variables referenced
  395. by their symbolic assembler language names.
  396. When a
  397. process stops, the register set is saved by the kernel
  398. at a known virtual address in the process memory map.
  399. The Acid variables associated with the registers point
  400. to the saved values and the
  401. .CW *
  402. indirection operator can then be used to read and write the register set.
  403. Since the registers are accessed via Acid variables they may
  404. be used in arbitrary expressions.
  405. .P1
  406. acid: PC // addr of saved PC
  407. 0xc0000f60
  408. acid: *PC
  409. 0x0000623c // contents of PC
  410. acid: *PC\ea
  411. main
  412. acid: *R1=10 // modify R1
  413. acid: asm(*PC+4) // disassemble @ PC+4
  414. main+0x4 0x00006240 MOVW R31,0x0(R29)
  415. main+0x8 0x00006244 MOVW $setR30(SB),R30
  416. main+0x10 0x0000624c MOVW R1,_clock(SB)
  417. .P2
  418. Here, the saved
  419. .CW PC
  420. is stored at address
  421. .CW 0xc0000f60 ;
  422. its current content is
  423. .CW 0x0000623c .
  424. The
  425. .CW a ' `
  426. format code converts this value to a string specifying
  427. the address as an offset beyond the nearest symbol.
  428. After setting the value of register
  429. .CW 1 ,
  430. the example uses the
  431. .CW asm
  432. command to disassemble a short section of code beginning
  433. at four bytes beyond the current value of the
  434. .CW PC .
  435. .NH
  436. Process Interface
  437. .PP
  438. A program executing under Acid is monitored through the
  439. .I proc
  440. file system interface provided by Plan 9.
  441. Textual messages written to the
  442. .CW ctl
  443. file control the execution of the process.
  444. For example writing
  445. .CW waitstop
  446. to the control file causes the write to block until the target
  447. process enters the kernel and is stopped. When the process is stopped
  448. the write completes. The
  449. .CW startstop
  450. message starts the target process and then does a
  451. .CW waitstop
  452. action.
  453. Synchronization between the debugger and the target process is determined
  454. by the actions of the various messages. Some operate asynchronously to the
  455. target process and always complete immediately, others block until the
  456. action completes. The asynchronous messages allow Acid to control
  457. several processes simultaneously.
  458. .PP
  459. The interpreter has builtin functions named after each of the control
  460. messages. The functions take a process id as argument.
  461. Any time a control message causes the program to execute instructions
  462. the interpreter performs two actions when the control operation has completed.
  463. The Acid variables pointing at the register set are fixed up to point
  464. at the saved registers, and then
  465. the user defined function
  466. .CW stopped
  467. is executed.
  468. The
  469. .CW stopped
  470. function may print the current address,
  471. line of source or instruction and return to interactive mode. Alternatively
  472. it may traverse a complex data structure, gather statistics and then set
  473. the program running again.
  474. .PP
  475. Several Acid variables are maintained by the debugger rather than the
  476. programmer.
  477. These variables allow generic Acid code to deal with the current process,
  478. architecture specifics or the symbol table.
  479. The variable
  480. .CW pid
  481. is the process id of the current process Acid is debugging.
  482. The variable
  483. .CW symbols
  484. contains a list of lists where each sublist contains the symbol
  485. name, its type and the value of the symbol.
  486. The variable
  487. .CW registers
  488. contains a list of the machine-specific register names. Global symbols in the target program
  489. can be referenced directly by name from Acid. Local variables
  490. are referenced using the colon operator as \f(CWfunction:variable\fP.
  491. .NH
  492. Source Level Debugging
  493. .PP
  494. Acid provides several builtin functions to manipulate source code.
  495. The
  496. .CW file
  497. function reads a text file, inserting each line into a list.
  498. The
  499. .CW pcfile
  500. and
  501. .CW pcline
  502. functions each take an address as an argument.
  503. The first
  504. returns a string containing the name of the source file
  505. and the second returns an integer containing the line number
  506. of the source line containing the instruction at the address.
  507. .P1
  508. acid: pcfile(main) // file containing main
  509. main.c
  510. acid: pcline(main) // line # of main in source
  511. 11
  512. acid: file(pcfile(main))[pcline(main)] // print that line
  513. main(int argc, char *argv[])
  514. acid: src(*PC) // print statements nearby
  515. 9
  516. 10 void
  517. >11 main(int argc, char *argv[])
  518. 12 {
  519. 13 int a;
  520. .P2
  521. In this example, the three primitives are combined in an expression to print
  522. a line of source code associated with an address.
  523. The
  524. .CW src
  525. function prints a few lines of source
  526. around the address supplied as its argument. A companion routine,
  527. .CW Bsrc ,
  528. communicates with the external editor
  529. .CW sam .
  530. Given an address, it loads the corresponding source file into the editor
  531. and highlights the line containing the address. This simple interface
  532. is easily extended to more complex functions.
  533. For example, the
  534. .CW step
  535. function can select the current file and line in the editor
  536. each time the target program stops, giving the user a visual
  537. trace of the execution path of the program. A more complete interface
  538. allowing two way communication between Acid and the
  539. .CW acme
  540. user interface [Pike93] is under construction. A filter between the debugger
  541. and the user interface provides interpretation of results from both
  542. sides of the interface. This allows the programming environment to
  543. interact with the debugger and vice-versa, a capability missing from the
  544. .CW sam
  545. interface.
  546. The
  547. .CW src
  548. and
  549. .CW Bsrc
  550. functions are both written in Acid code using the file and line primitives.
  551. Acid provides library functions to step through source level
  552. statements and functions. Furthermore, addresses in Acid expressions can be
  553. specified by source file and line.
  554. Source code is manipulated in the Acid
  555. .I list
  556. data type.
  557. .NH
  558. The Acid Library
  559. .PP
  560. The following examples define some useful commands and
  561. illustrate the interaction of the debugger and the interpreter.
  562. .P1
  563. defn bpset(addr) // set breakpoint
  564. {
  565. if match(addr, bplist) >= 0 then
  566. print("bkpoint already set:", addr\ea, "\en");
  567. else {
  568. *fmt(addr, bpfmt) = bpinst; // plant it
  569. bplist = append bplist, addr; // add to list
  570. }
  571. }
  572. .P2
  573. The
  574. .CW bpset
  575. function plants a break point in memory. The function starts by
  576. using the
  577. .CW match
  578. builtin to
  579. search the breakpoint list to determine if a breakpoint is already
  580. set at the address.
  581. The indirection operator, controlled by the format code returned
  582. by the
  583. .CW fmt
  584. primitive, is used to plant the breakpoint in memory.
  585. The variables
  586. .CW bpfmt
  587. and
  588. .CW bpinst
  589. are Acid global variables containing the format code specifying
  590. the size of the breakpoint instruction and the breakpoint instruction
  591. itself.
  592. These
  593. variables are set by architecture-dependent library code
  594. when the debugger first attaches to the executing image.
  595. Finally the address of the breakpoint is
  596. appended to the breakpoint list,
  597. .CW bplist .
  598. .P1
  599. defn step() // single step
  600. {
  601. local lst, lpl, addr, bput;
  602. bput = 0; // sitting on bkpoint
  603. if match(*PC, bplist) >= 0 then {
  604. bput = fmt(*PC, bpfmt); // save current addr
  605. *bput = @bput; // replace it
  606. }
  607. lst = follow(*PC); // get follow set
  608. lpl = lst;
  609. while lpl do { // place breakpoints
  610. *(head lpl) = bpinst;
  611. lpl = tail lpl;
  612. }
  613. startstop(pid); // do the step
  614. while lst do { // remove breakpoints
  615. addr = fmt(head lst, bpfmt);
  616. *addr = @addr; // replace instr.
  617. lst = tail lst;
  618. }
  619. if bput != 0 then
  620. *bput = bpinst; // restore breakpoint
  621. }
  622. .P2
  623. The
  624. .CW step
  625. function executes a single assembler instruction.
  626. If the
  627. .CW PC
  628. is sitting
  629. on a breakpoint, the address and size of
  630. the breakpoint are saved.
  631. The breakpoint instruction
  632. is then removed using the
  633. .CW @
  634. operator to fetch
  635. .CW bpfmt
  636. bytes from the text file and to place it into the memory
  637. of the executing process using the
  638. .CW *
  639. operator.
  640. The
  641. .CW follow
  642. function is an Acid
  643. builtin which returns a follow-set: a list of instruction addresses which
  644. could be executed next.
  645. If the instruction stored at the
  646. .CW PC
  647. is a branch instruction, the
  648. list contains the addresses of the next instruction and
  649. the branch destination; otherwise, it contains only the
  650. address of the next instruction.
  651. The follow-set is then used to replace each possible following
  652. instruction with a breakpoint instruction. The original
  653. instructions need not be saved; they remain
  654. in their unaltered state in the text file.
  655. The
  656. .CW startstop
  657. builtin writes the `startstop' message to the
  658. .I proc
  659. control file for the process named
  660. .CW pid .
  661. The target process executes until some condition causes it to
  662. enter the kernel, in this case, the execution of a breakpoint.
  663. When the process blocks, the debugger regains control and invokes the
  664. Acid library function
  665. .CW stopped
  666. which reports the address and cause of the blockage.
  667. The
  668. .CW startstop
  669. function completes and returns to the
  670. .CW step
  671. function where
  672. the follow-set is used to replace the breakpoints placed earlier.
  673. Finally, if the address of the original
  674. .CW PC
  675. contained a breakpoint, it is replaced.
  676. .PP
  677. Notice that this approach to process control is inherently portable;
  678. the Acid code is shared by the debuggers for all architectures.
  679. Acid variables and builtin functions provide a transparent interface
  680. to architecture-dependent values and functions. Here the breakpoint
  681. value and format are referenced through Acid variables and the
  682. .CW follow
  683. primitive masks the differences in the underlying instruction set.
  684. .PP
  685. The
  686. .CW next
  687. function, similar to the
  688. .I dbx
  689. command of the same name,
  690. is a simpler example.
  691. This function steps through
  692. a single source statement but steps over function calls.
  693. .P1
  694. defn next()
  695. {
  696. local sp, bound;
  697. sp = *SP; // save starting SP
  698. bound = fnbound(*PC); // begin & end of fn.
  699. stmnt(); // step 1 statement
  700. pc = *PC;
  701. if pc >= bound[0] && pc < bound[1] then
  702. return {};
  703. while (pc<bound[0] || pc>bound[1]) && sp>=*SP do {
  704. step();
  705. pc = *PC;
  706. }
  707. src(*PC);
  708. }
  709. .P2
  710. The
  711. .CW next
  712. function
  713. starts by saving the current stack pointer in a local variable.
  714. It then uses the Acid library function
  715. .CW fnbound
  716. to return the addresses of the first and last instructions in
  717. the current function in a list.
  718. The
  719. .CW stmnt
  720. function executes a single source statement and then uses
  721. .CW src
  722. to print a few lines of source around the new
  723. .CW PC .
  724. If the new value of the
  725. .CW PC
  726. remains in the current function,
  727. .CW next
  728. returns.
  729. When the executed statement is a function call or a return
  730. from a function, the new value of the
  731. .CW PC
  732. is outside the bounds calculated by
  733. .CW fnbound
  734. and the test of the
  735. .CW while
  736. loop is evaluated.
  737. If the statement was a return, the new value of the stack pointer
  738. is greater than the original value and the loop completes without
  739. execution.
  740. Otherwise, the loop is entered and instructions are continually
  741. executed until the value of the
  742. .CW PC
  743. is between the bounds calculated earlier. At that point, execution
  744. ceases and a few lines of source in the vicinity of the
  745. .CW PC
  746. are printed.
  747. .PP
  748. Acid provides concise and elegant expression for control and
  749. manipulation of target programs. These examples demonstrate how a
  750. few well-chosen primitives can be combined to create a rich debugging environment.
  751. .NH
  752. Dealing With Multiple Architectures
  753. .PP
  754. A single binary of Acid may be used to debug a program running on any
  755. of the five processor architectures supported by Plan 9. For example,
  756. Plan 9 allows a user on a MIPS to import the
  757. .I proc
  758. file system from an i486-based PC and remotely debug a program executing
  759. on that processor.
  760. .PP
  761. Two levels of abstraction provide this architecture independence.
  762. On the lowest level, a Plan 9 library supplies functions to
  763. decode the file header of the program being debugged and
  764. select a table of system parameters
  765. and a jump vector of architecture-dependent
  766. functions based on the magic number.
  767. Among these functions are byte-order-independent
  768. access to memory and text files, stack manipulation, disassembly,
  769. and floating point number interpretation.
  770. The second level of abstraction is supplied by Acid.
  771. It consists of primitives and approximately 200 lines
  772. of architecture-dependent Acid library code that interface the
  773. interpreter to the architecture-dependent library.
  774. This layer performs functions such as mapping register names to
  775. memory locations, supplying breakpoint values and sizes,
  776. and converting processor specific data to Acid data types.
  777. An example of the latter is the stack trace function
  778. .CW strace ,
  779. which uses the stack traversal functions in the
  780. architecture-dependent library to construct a list of lists describing
  781. the context of a process. The first level of list selects
  782. each function in the trace; subordinate lists contain the
  783. names and values of parameters and local variables of
  784. the functions. Acid commands and library functions that
  785. manipulate and display process state information operate
  786. on the list representation and are independent of the
  787. underlying architecture.
  788. .NH
  789. Alef Runtime
  790. .PP
  791. Alef is a concurrent programming language,
  792. designed specifically for systems programming, which supports both
  793. shared variable and message passing paradigms.
  794. Alef borrows the C expression syntax but implements
  795. a substantially different type system.
  796. The language provides a rich set of
  797. exception handling, process management, and synchronization
  798. primitives, which rely on a runtime system.
  799. Alef program bugs are often deadlocks, synchronization failures,
  800. or non-termination caused by locks being held incorrectly.
  801. In such cases, a process stalls deep
  802. in the runtime code and it is clearly
  803. unreasonable to expect a programmer using the language
  804. to understand the detailed
  805. internal semantics of the runtime support functions.
  806. .PP
  807. Instead, there is an Alef support library, coded in Acid, that
  808. allows the programmer to interpret the program state in terms of
  809. Alef operations. Consider the example of a multi-process program
  810. stalling because of improper synchronization. A stack trace of
  811. the program indicates that it is waiting for an event in some
  812. obscure Alef runtime
  813. synchronization function.
  814. The function itself is irrelevant to the
  815. programmer; of greater importance is the identity of the
  816. unfulfilled event.
  817. Commands in the Alef support library decode
  818. the runtime data structures and program state to report the cause
  819. of the blockage in terms of the high-level operations available to
  820. the Alef programmer.
  821. Here, the Acid language acts
  822. as a communications medium between Alef implementer and Alef user.
  823. .NH
  824. Parallel Debugging
  825. .PP
  826. The central issue in parallel debugging is how the debugger is
  827. multiplexed between the processes comprising
  828. the program.
  829. Acid has no intrinsic model of process partitioning; it
  830. only assumes that parallel programs share a symbol table,
  831. though they need not share memory.
  832. The
  833. .CW setproc
  834. primitive attaches the debugger to a running process
  835. associated with the process ID supplied as its argument
  836. and assigns that value to the global variable
  837. .CW pid ,
  838. thereby allowing simple rotation among a group of processes.
  839. Further, the stack trace primitive is driven by parameters
  840. specifying a unique process context, so it is possible to
  841. examine the state of cooperating processes without switching
  842. the debugger focus from the process of interest.
  843. Since Acid is inherently extensible and capable of
  844. dynamic interaction with subordinate processes, the
  845. programmer can define Acid commands to detect and control
  846. complex interactions between processes.
  847. In short, the programmer is free to specify how the debugger reacts
  848. to events generated in specific threads of the program.
  849. .PP
  850. The support for parallel debugging in Acid depends on a crucial kernel
  851. modification: when the text segment of a program is written (usually to
  852. place a breakpoint), the segment is cloned to prevent other threads
  853. from encountering the breakpoint. Although this incurs a slight performance
  854. penalty, it is of little importance while debugging.
  855. .NH
  856. Communication Between Tools
  857. .PP
  858. The Plan 9 Alef and C compilers do not
  859. embed detailed type information in the symbol table of an
  860. executable file.
  861. However, they do accept a command line option causing them to
  862. emit descriptions of complex data types
  863. (e.g., aggregates and abstract data types)
  864. to an auxiliary file.
  865. The vehicle for expressing this information is Acid source code.
  866. When an Acid debugging session is
  867. subsequently started, that file is loaded with the other Acid libraries.
  868. .PP
  869. For each complex object in the program the compiler generates
  870. three pieces of Acid code.
  871. The first is a table describing the size and offset of each
  872. member of the complex data type. Following is an Acid function,
  873. named the same as the object, that formats and prints each member.
  874. Finally, Acid declarations associate the
  875. Alef or C program variables of a type with the functions
  876. to print them.
  877. The three forms of declaration are shown in the following example:
  878. .P1
  879. struct Bitmap {
  880. Rectangle 0 r;
  881. Rectangle 16 clipr;
  882. 'D' 32 ldepth;
  883. 'D' 36 id;
  884. 'X' 40 cache;
  885. };
  886. .P2
  887. .P1
  888. defn
  889. Bitmap(addr) {
  890. complex Bitmap addr;
  891. print("Rectangle r {\en");
  892. Rectangle(addr.r);
  893. print("}\en");
  894. print("Rectangle clipr {\en");
  895. Rectangle(addr.clipr);
  896. print("}\en");
  897. print(" ldepth ", addr.ldepth, "\en");
  898. print(" id ", addr.id, "\en");
  899. print(" cache ", addr.cache, "\en");
  900. };
  901. complex Bitmap darkgrey;
  902. complex Bitmap Window_settag:b;
  903. .P2
  904. The
  905. .CW struct
  906. declaration specifies decoding instructions for the complex type named
  907. .CW Bitmap .
  908. Although the syntax is superficially similar to a C structure declaration,
  909. the semantics differ markedly: the C declaration specifies a layout, while
  910. the Acid declaration tells how to decode it.
  911. The declaration specifies a type, an offset, and name for each
  912. member of the complex object. The type is either the name of another
  913. complex declaration, for example,
  914. .CW Rectangle ,
  915. or a format code.
  916. The offset is the number of bytes from the start
  917. of the object to the member
  918. and the name is the member's name in the Alef or C declaration.
  919. This type description is a close match for C and Alef, but is simple enough
  920. to be language independent.
  921. .PP
  922. The
  923. .CW Bitmap
  924. function expects the address of a
  925. .CW Bitmap
  926. as its only argument.
  927. It uses the decoding information contained in the
  928. .CW Bitmap
  929. structure declaration to extract, format, and print the
  930. value of each member of the complex object pointed to by
  931. the argument.
  932. The Alef compiler emits code to call other Acid functions
  933. where a member is another complex type; here,
  934. .CW Bitmap
  935. calls
  936. .CW Rectangle
  937. to print its contents.
  938. .PP
  939. The
  940. .CW complex
  941. declarations associate Alef variables with complex types.
  942. In the example,
  943. .CW darkgrey
  944. is the name of a global variable of type
  945. .CW Bitmap
  946. in the program being debugged.
  947. Whenever the name
  948. .CW darkgrey
  949. is evaluated by Acid, it automatically calls the
  950. .CW Bitmap
  951. function with the address of
  952. .CW darkgrey
  953. as the argument.
  954. The second
  955. .CW complex
  956. declaration associates a local variable or parameter named
  957. .CW b
  958. in function
  959. .CW Window_settag
  960. with the
  961. .CW Bitmap
  962. complex data type.
  963. .PP
  964. Acid borrows the C operators
  965. .CW .
  966. and
  967. .CW ->
  968. to access the decoding parameters of a member of a complex type.
  969. Although this representation is sufficiently general for describing
  970. the decoding of both C and Alef complex data types, it may
  971. prove too restrictive for target languages with more complicated
  972. type systems.
  973. Further, the assumption that the compiler can select the proper
  974. Acid format code for each basic type in the language is somewhat
  975. naive. For example, when a member of a complex type is a pointer,
  976. it is assigned a hexadecimal type code; integer members are always
  977. assigned a decimal type code.
  978. This heuristic proves inaccurate when an integer field is a
  979. bit mask or set of bit flags which are more appropriately displayed
  980. in hexadecimal or octal.
  981. .NH
  982. Code Verification
  983. .PP
  984. Acid's ability to interact dynamically with
  985. an executing program allows passive test and
  986. verification of the target program. For example,
  987. a common concern is leak detection in programs using
  988. .CW malloc .
  989. Of interest are two items: finding memory that was allocated
  990. but never freed and detecting bad pointers passed to
  991. .CW free .
  992. An auxiliary Acid library contains Acid functions to
  993. monitor the execution of a program and detect these
  994. faults, either as they happen or in the automated
  995. post-mortem analysis of the memory arena.
  996. In the following example, the
  997. .CW sort
  998. command is run under the control of the
  999. Acid memory leak library.
  1000. .P1
  1001. helix% acid -l malloc /bin/sort
  1002. /bin/sort: mips plan 9 executable
  1003. /lib/acid/port
  1004. /lib/acid/mips
  1005. /lib/acid/malloc
  1006. acid: go()
  1007. now
  1008. is
  1009. the
  1010. time
  1011. <ctrl-d>
  1012. is
  1013. now
  1014. the
  1015. time
  1016. 27680 : breakpoint _exits+0x4 MOVW $0x8,R1
  1017. acid:
  1018. .P2
  1019. The
  1020. .CW go
  1021. command creates a process and plants
  1022. breakpoints at the entry to
  1023. .CW malloc
  1024. and
  1025. .CW free .
  1026. The program is then started and continues until it
  1027. exits or stops. If the reason for stopping is anything
  1028. other than the breakpoints in
  1029. .CW malloc
  1030. and
  1031. .CW free ,
  1032. Acid prints the usual status information and returns to the
  1033. interactive prompt.
  1034. .PP
  1035. When the process stops on entering
  1036. .CW malloc ,
  1037. the debugger must capture and save the address that
  1038. .CW malloc
  1039. will return.
  1040. After saving a stack
  1041. trace so the calling routine can be identified, it places
  1042. a breakpoint at the return address and restarts the program.
  1043. When
  1044. .CW malloc
  1045. returns, the breakpoint stops the program,
  1046. allowing the debugger
  1047. to grab the address of the new memory block from the return register.
  1048. The address and stack trace are added to the list of outstanding
  1049. memory blocks, the breakpoint is removed from the return point, and
  1050. the process is restarted.
  1051. .PP
  1052. When the process stops at the beginning of
  1053. .CW free ,
  1054. the memory address supplied as the argument is compared to the list
  1055. of outstanding memory blocks. If it is not found an error message
  1056. and a stack trace of the call is reported; otherwise, the
  1057. address is deleted from the list.
  1058. .PP
  1059. When the program exits, the list of outstanding memory blocks contains
  1060. the addresses of all blocks that were allocated but never freed.
  1061. The
  1062. .CW leak
  1063. library function traverses the list producing a report describing
  1064. the allocated blocks.
  1065. .P1 1m
  1066. acid: leak()
  1067. Lost a total of 524288 bytes from:
  1068. malloc() malloc.c:32 called from dofile+0xe8 sort.c:217
  1069. dofile() sort.c:190 called from main+0xac sort.c:161
  1070. main() sort.c:128 called from _main+0x20 main9.s:10
  1071. Lost a total of 64 bytes from:
  1072. malloc() malloc.c:32 called from newline+0xfc sort.c:280
  1073. newline() sort.c:248 called from dofile+0x110 sort.c:222
  1074. dofile() sort.c:190 called from main+0xac sort.c:161
  1075. main() sort.c:128 called from _main+0x20 main9.s:10
  1076. Lost a total of 64 bytes from:
  1077. malloc() malloc.c:32 called from realloc+0x14 malloc.c:129
  1078. realloc() malloc.c:123 called from bldkey+0x358 sort.c:1388
  1079. buildkey() sort.c:1345 called from newline+0x150 sort.c:285
  1080. newline() sort.c:248 called from dofile+0x110 sort.c:222
  1081. dofile() sort.c:190 called from main+0xac sort.c:161
  1082. main() sort.c:128 called from _main+0x20 main9.s:10
  1083. acid: refs()
  1084. data...bss...stack...
  1085. acid: leak()
  1086. acid:
  1087. .P2
  1088. The presence of a block in the allocation list does not imply
  1089. it is there because of a leak; for instance, it may have been
  1090. in use when the program terminated.
  1091. The
  1092. .CW refs()
  1093. library function scans the
  1094. .I data ,
  1095. .I bss ,
  1096. and
  1097. .I stack
  1098. segments of the process looking for pointers
  1099. into the allocated blocks. When one is found, the block is deleted from
  1100. the outstanding block list.
  1101. The
  1102. .CW leak
  1103. function is used again to report the
  1104. blocks remaining allocated and unreferenced.
  1105. This strategy proves effective in detecting
  1106. disconnected (but non-circular) data structures.
  1107. .PP
  1108. The leak detection process is entirely passive.
  1109. The program is not
  1110. specially compiled and the source code is not required.
  1111. As with the Acid support functions for the Alef runtime environment,
  1112. the author of the library routines has encapsulated the
  1113. functionality of the library interface
  1114. in Acid code.
  1115. Any programmer may then check a program's use of the
  1116. library routines without knowledge of either implementation.
  1117. The performance impact of running leak detection is great
  1118. (about 10 times slower),
  1119. but it has not prevented interactive programs like
  1120. .CW sam
  1121. and the
  1122. .CW 8½
  1123. window system from being tested.
  1124. .NH
  1125. Code Coverage
  1126. .PP
  1127. Another common component of software test uses
  1128. .I coverage
  1129. analysis.
  1130. The purpose of the test is to determine which paths through the code have
  1131. not been executed while running the test suite.
  1132. This is usually
  1133. performed by a combination of compiler support and a reporting tool run
  1134. on the output generated by statements compiled into the program.
  1135. The compiler emits code that
  1136. logs the progress of the program as it executes basic blocks and writes the
  1137. results to a file. The file is then processed by the reporting tool
  1138. to determine which basic blocks have not been executed.
  1139. .PP
  1140. Acid can perform the same function in a language independent manner without
  1141. modifying the source, object or binary of the program. The following example
  1142. shows
  1143. .CW ls
  1144. being run under the control of the Acid coverage library.
  1145. .P1
  1146. philw-helix% acid -l coverage /bin/ls
  1147. /bin/ls: mips plan 9 executable
  1148. /lib/acid/port
  1149. /lib/acid/mips
  1150. /lib/acid/coverage
  1151. acid: coverage()
  1152. acid
  1153. newstime
  1154. profile
  1155. tel
  1156. wintool
  1157. 2: (error) msg: pid=11419 startstop: process exited
  1158. acid: analyse(ls)
  1159. ls.c:102,105
  1160. 102: return 1;
  1161. 103: }
  1162. 104: if(db[0].qid.path&CHDIR && dflag==0){
  1163. 105: output();
  1164. ls.c:122,126
  1165. 122: memmove(dirbuf+ndir, db, sizeof(Dir));
  1166. 123: dirbuf[ndir].prefix = 0;
  1167. 124: p = utfrrune(s, '/');
  1168. 125: if(p){
  1169. 126: dirbuf[ndir].prefix = s;
  1170. .P2
  1171. The
  1172. .CW coverage
  1173. function begins by looping through the text segment placing
  1174. breakpoints at the entry to each basic block. The start of each basic
  1175. block is found using the Acid builtin function
  1176. .CW follow .
  1177. If the list generated by
  1178. .CW follow
  1179. contains more than one
  1180. element, then the addresses mark the start of basic blocks. A breakpoint
  1181. is placed at each address to detect entry into the block. If the result
  1182. of
  1183. .CW follow
  1184. is a single address then no action is taken, and the next address is
  1185. considered. Acid maintains a list of
  1186. breakpoints already in place and avoids placing duplicates (an address may be
  1187. the destination of several branches).
  1188. .PP
  1189. After placing the breakpoints the program is set running.
  1190. Each time a breakpoint is encountered
  1191. Acid deletes the address from the breakpoint list, removes the breakpoint
  1192. from memory and then restarts the program.
  1193. At any instant the breakpoint list contains the addresses of basic blocks
  1194. which have not been executed.
  1195. The
  1196. .CW analyse
  1197. function reports the lines of source code bounded by basic blocks
  1198. whose addresses are have not been deleted from the breakpoint list.
  1199. These are the basic blocks which have not been executed.
  1200. Program performance is almost unaffected since each breakpoint is executed
  1201. only once and then removed.
  1202. .PP
  1203. The library contains a total of 128 lines of Acid code.
  1204. An obvious extension of this algorithm could be used to provide basic block
  1205. profiling.
  1206. .NH
  1207. Conclusion
  1208. .PP
  1209. Acid has two areas of weakness. As with
  1210. other language-based tools like
  1211. .I awk ,
  1212. a programmer must learn yet another language to step beyond the normal
  1213. debugging functions and use the full power of the debugger.
  1214. Second, the command line interface supplied by the
  1215. .I yacc
  1216. parser is inordinately clumsy.
  1217. Part of the problem relates directly to the use of
  1218. .I yacc
  1219. and could be circumvented with a custom parser.
  1220. However, structural problems would remain: Acid often requires
  1221. too much typing to execute a simple
  1222. command.
  1223. A debugger should prostitute itself to its users, doing whatever
  1224. is wanted with a minimum of encouragement; commands should be
  1225. concise and obvious. The language interface is more consistent than
  1226. an ad hoc command interface but is clumsy to use.
  1227. Most of these problems are addressed by an Acme interface
  1228. which is under construction. This should provide the best of
  1229. both worlds: graphical debugging and access to the underlying acid
  1230. language when required.
  1231. .PP
  1232. The name space clash between Acid variables, keywords, program variables,
  1233. and functions is unavoidable.
  1234. Although it rarely affects a debugging session, it is annoying
  1235. when it happens and is sometimes difficult to circumvent.
  1236. The current renaming scheme
  1237. is too crude; the new names are too hard to remember.
  1238. .PP
  1239. Acid has proved to be a powerful tool whose applications
  1240. have exceeded expectations.
  1241. Of its strengths, portability, extensibility and parallel debugging support
  1242. were by design and provide the expected utility.
  1243. In retrospect,
  1244. its use as a tool for code test and verification and as
  1245. a medium for communicating type information and encapsulating
  1246. interfaces has provided unanticipated benefits and altered our
  1247. view of the debugging process.
  1248. .NH
  1249. Acknowledgments
  1250. .PP
  1251. Bob Flandrena was the first user and helped prepare the paper.
  1252. Rob Pike endured three buggy Alef compilers and a new debugger
  1253. in a single sitting.
  1254. .NH
  1255. References
  1256. .LP
  1257. [Pike90] R. Pike, D. Presotto, K. Thompson, H. Trickey,
  1258. ``Plan 9 from Bell Labs'',
  1259. .I
  1260. UKUUG Proc. of the Summer 1990 Conf.,
  1261. .R
  1262. London, England,
  1263. 1990.
  1264. .LP
  1265. [Gol93] M. Golan, D. Hanson,
  1266. ``DUEL -- A Very High-Level Debugging Language'',
  1267. .I
  1268. USENIX Proc. of the Winter 1993 Conf.,
  1269. .R
  1270. San Diego, CA,
  1271. 1993.
  1272. .LP
  1273. [Lin90] M. A. Linton,
  1274. ``The Evolution of DBX'',
  1275. .I
  1276. USENIX Proc. of the Summer 1990 Conf.,
  1277. .R
  1278. Anaheim, CA,
  1279. 1990.
  1280. .LP
  1281. [Stal91] R. M. Stallman, R. H. Pesch,
  1282. ``Using GDB: A guide to the GNU source level debugger'',
  1283. Technical Report, Free Software Foundation,
  1284. Cambridge, MA,
  1285. 1991.
  1286. .LP
  1287. [Win93] P. Winterbottom,
  1288. ``Alef reference Manual'',
  1289. reprinted in this volume.
  1290. .LP
  1291. [Pike93] Rob Pike,
  1292. ``Acme: A User Interface for Programmers'',
  1293. .I
  1294. USENIX Proc. of the Winter 1994 Conf.,
  1295. .R
  1296. San Francisco, CA,
  1297. reprinted in this volume.
  1298. .LP
  1299. [Ols90] Ronald A. Olsson, Richard H. Crawford, and W. Wilson Ho,
  1300. ``Dalek: A GNU, improved programmable debugger'',
  1301. .I
  1302. USENIX Proc. of the Summer 1990 Conf.,
  1303. .R
  1304. Anaheim, CA.
  1305. .LP
  1306. [May92] Paul Maybee,
  1307. ``NeD: The Network Extensible Debugger''
  1308. .I
  1309. USENIX Proc. of the Summer 1992 Conf.,
  1310. .R
  1311. San Antonio, TX.
  1312. .LP
  1313. [Aral] Ziya Aral, Ilya Gertner, and Greg Schaffer,
  1314. ``Efficient debugging primitives for multiprocessors'',
  1315. .I
  1316. Proceedings of the Third International Conference on Architectural
  1317. Support for Programming Languages and Operating Systems,
  1318. .R
  1319. SIGPLAN notices Nr. 22, May 1989.