5 .ta 1i 2.3i 4.5i (optional to set tabs)
10 philw@plan9.bell-labs.com
14 Acid is a general purpose, source level symbolic debugger.
15 The debugger is built around a simple command language.
16 The command language, distinct from the language of the program being debugged,
17 provides a flexible user interface that allows the debugger
18 interface to be customized for a specific application or architecture.
19 Moreover, it provides an opportunity to write test and
20 verification code independently of a program's source code.
21 Acid is able to debug multiple
22 processes provided they share a common set of symbols, such as the processes in
25 Like other language-based solutions, Acid presents a poor user interface but
26 provides a powerful debugging tool.
27 Application of Acid to hard problems is best approached by writing functions off-line
28 (perhaps loading them with the
30 function or using the support provided by
32 rather than by trying to type intricate Acid operations
33 at the interactive prompt.
35 Acid allows the execution of a program to be controlled by operating on its
36 state while it is stopped and by monitoring and controlling its execution
37 when it is running. Each program action that causes a change
38 of execution state is reflected by the execution
39 of an Acid function, which may be user defined.
40 A library of default functions provides the functionality of a normal debugger.
42 A Plan 9 process is controlled by writing messages to a control file in the
44 file system. Each control message has a corresponding Acid function, which
45 sends the message to the process. These functions take a process id
48 argument. The memory and text file of the program may be manipulated using
49 the indirection operators. The symbol table, including source cross reference,
50 is available to an Acid program. The combination allows complex operations
51 to be performed both in terms of control flow and data manipulation.
53 Input format and \f(CWwhatis\fP
57 and continue to the end of the line.
58 Input is a series of statements and expressions separated by semicolons.
59 At the top level of the interpreter, the builtin function
61 is called automatically to display the result of all expressions except function calls.
64 may be used as a shorthand to force the result of a function call to be printed.
66 Also at the top level, newlines are treated as semicolons
67 by the parser, so semicolons are unnecessary when evaluating expressions.
69 When Acid starts, it loads the default program modules,
70 enters interactive mode, and prints a prompt. In this state Acid accepts
71 either function definitions or statements to be evaluated.
72 In this interactive mode
73 statements are evaluated immediately, while function definitions are
74 stored for later invocation.
78 operator can be used to report the state of identifiers known to the interpreter.
81 reports the name of all defined Acid functions; when supplied with an identifier
82 as an argument it reports any variable, function, or type definition
83 associated with the identifier.
84 Because of the way the interpreter handles semicolons,
87 statement can be returned directly to Acid without adding semicolons.
88 A syntax error or interrupt returns Acid to the normal evaluation
89 mode; any partially evaluated definitions are lost.
91 Using the Library Functions
93 After loading the program binary, Acid loads the portable and architecture-specific
94 library functions that form the standard debugging environment.
95 These files are Acid source code and are human-readable.
96 The following example uses the standard debugging library to show how
97 language and program interact:
100 /bin/ls:mips plan 9 executable
105 75721: system call _main ADD $-0x14,R29
106 75721: breakpoint main+0x4 MOVW R31,0x0(R29)
109 75721: breakpoint ls ADD $-0x16c8,R29
111 At pc:0x0000141c:ls /sys/src/cmd/ls.c:87
112 ls(s=0x0000004d,multi=0x00000000) /sys/src/cmd/ls.c:87
113 called from main+0xf4 /sys/src/cmd/ls.c:79
114 main(argc=0x00000000,argv=0x7ffffff0) /sys/src/cmd/ls.c:48
115 called from _main+0x20 /sys/src/libc/mips/main9.s:10
125 creates a new process and stops it at the first instruction.
126 This change in state is reported by a call to the
129 which is called by the interpreter whenever the debugged program stops.
131 prints the status line giving the pid, the reason the program stopped
132 and the address and instruction at the current PC.
135 makes an entry in the breakpoint table and plants a breakpoint in memory.
138 function continues the process, allowing it to run until some condition
139 causes it to stop. In this case the program hits the breakpoint placed on
142 in the C program. Once again the
144 routine is called to print the status of the program. The function
146 prints a C stack trace of the current process. It is implemented using
147 a builtin Acid function that returns the stack trace as a list; the code
148 that formats the information is all written in Acid.
151 holds the address of the
152 cell where the current value of the processor register
154 is stored. By indirecting through
157 the address where the program is stopped can be found.
158 All of the processor registers are available by the same mechanism.
162 An Acid variable has one of four types:
168 The type of a variable is inferred from the type of the right-hand
169 side of the assignment expression which last set its value.
170 Referencing a variable that has not yet
171 been assigned draws a "used but not set" error. Many of the operators may
172 be applied to more than
173 one type; for these operators the action of the operator is determined by
174 the types of its operands. The action of each operator is defined in the
176 section of this manual.
180 Acid has three kinds of variables: variables defined by the symbol table
181 of the debugged program, variables that are defined and maintained
182 by the interpreter as the debugged program changes state, and variables
183 defined and used by Acid programs.
185 Some examples of variables maintained by the interpreter are the register
186 pointers listed by name in the Acid list variable
188 and the symbol table listed by name and contents in the Acid variable
193 is updated by the interpreter to select the most recently created process
194 or the process selected by the
200 In addition to a type, variables have formats. The format is a code
201 letter that determines the printing style and the effect of some of the
202 operators on that variable. The format codes are derived from the format
205 By default, symbol table variables and numeric constants
206 are assigned the format code
208 which specifies 32-bit hexadecimal.
209 Printing a variable with this code yields the output
211 The format code of a variable may be changed from the default by using the
214 This function takes two arguments, an expression and a format code. After
215 the expression is evaluated the new format code is attached to the result
216 and forms the return value from
218 The backslash operator is a short form of
220 The format supplied by the backslash operator must be the format character
221 rather than an expression.
222 If the result is assigned to a variable the new format code is maintained
223 in the variable. For example:
228 acid: x = fmt(x, 'D')
229 acid: print(x, fmt(x, 'X'))
236 The supported format characters are:
239 Print two-byte integer in octal.
241 Print four-byte integer in octal.
243 Print two-byte integer in signed octal.
245 Print four-byte integer in signed octal.
247 Print four-byte integer in binary.
249 Print two-byte integer in signed decimal.
251 Print four-byte integer in signed decimal.
253 Print eight-byte integer in signed decimal.
255 Print eight-byte integer in unsigned decimal.
257 Print two-byte integer in hexadecimal.
259 Print four-byte integer in hexadecimal.
261 Print eight-byte integer in hexadecimal.
263 Print two-byte integer in unsigned decimal.
265 Print four-byte integer in unsigned decimal.
267 Print single-precision floating point number.
269 Print double-precision floating point number.
271 Print a single precision floating point number in string format.
273 Print a double precision floating point number in string format.
275 Print byte in hexadecimal.
277 Print byte as an ASCII character.
282 printable ASCII characters represented normally and
283 others printed in the form \f(CW\ex\fInn\fR.
285 Interpret the addressed bytes as UTF characters
286 and print successive characters until a zero byte is reached.
288 Print a two-byte integer as a rune.
290 Print successive two-byte integers as runes
291 until a zero rune is reached.
293 Print as machine instructions.
297 above, but print the machine instructions in
298 an alternate form if possible:
302 reproduce the manufacturers' syntax.
304 Print the value in symbolic form.
309 Acid permits the definition of the layout of memory.
310 The usual method is to use the
312 flag of the compilers to produce Acid-language descriptions of data structures (see
314 although such definitions can be typed interactively.
321 are all equivalent; the compiler uses the synonyms to document the declarations.
322 A complex type is described as a set of members, each containing a format letter,
323 an offset in the structure, and a name. For example, the C structure
330 is described by the Acid statement
340 Variables are global unless they are either parameters to functions
343 in a function body. Parameters and local variables are available only in
344 the body of the function in which they are instantiated.
345 Variables are dynamically bound: if a function declares a local variable
346 with the same name as a global variable, the global variable will be hidden
347 whenever the function is executing.
348 For example, if a function
352 any function called below
354 will see the local version of
356 not the external symbol.
360 Since the symbol table specifies addresses,
361 to access the value of program variables
362 an extra level of indirection
363 is required relative to the source code.
364 For consistency, the registers are maintained as pointers as well; Acid variables with the names
365 of processor registers point to cells holding the saved registers.
367 The location in a file or memory image associated with
368 an address is calculated from a map
369 associated with the file.
370 Each map contains one or more quadruples (\c
375 defining a segment named
383 mapping addresses in the range
387 to the part of the file
391 The memory model of a Plan 9 process assumes
392 that segments are disjoint. There
393 can be more than one segment of a given type (e.g., a process
394 may have more than one text segment) but segments
407 the location in the file
416 the text and initialized data of a program
417 are mapped by segments called
421 Since a program file does not contain bss, stack, or register data,
423 not mapped by the data segment.
424 The text segment is mapped similarly in the memory image of
425 a normal (i.e., non-kernel) process.
426 However, the segment called
428 maps memory from the beginning to the end of the program's data space.
429 This region contains the program's static data, the bss, the
430 heap and the stack. A segment
435 maps the floating point registers.
437 Sometimes it is useful to define a map with a single segment
438 mapping the region from 0 to 0xFFFFFFFF; such a map
439 allows the entire file to be examined
440 without address translation. The builtin function
442 examines and modifies Acid's map for a process.
446 Name conflicts between keywords in the Acid language, symbols in the program,
447 and previously defined functions are resolved when the interpreter starts up.
448 Each name is made unique by prefixing enough
450 characters to the front of the name to make it unique. Acid reports
451 a list of each name change at startup. The report looks like this:
453 /bin/sam: mips plan 9 executable
457 append=$append T/0xa4e40
462 is both a keyword and a text symbol in the program. The message reports
463 that the text symbol is now named
468 Operators have the same
469 binding and precedence as in C.
470 For operators of equal precedence, expressions are evaluated from left to right.
474 If an expression is evaluated for a boolean condition the test
475 performed depends on the type of the result. If the result is of
479 type the result is true if the value is non-zero. If the expression is a
481 the result is true if there are any members in the list.
482 If the expression is a
484 the result is true if there are any characters in the string.
488 identifier \f(CW:\fP identifier
490 \f(CW(\fP expression \f(CW)\fP
491 \f(CW{\fP elist \f(CW}\fP
497 An identifier may be any legal Acid variable. The colon operator returns the
498 address of parameters or local variables in the current stack of a program.
503 prints the number of arguments passed into main. Local variables and parameters
504 can only be referenced after the frame has been established. It may be necessary to
505 step a program over the first few instructions of a breakpointed function to properly set
508 Constants follow the same lexical rules as C.
509 A list of expressions delimited by braces forms a list constructor.
510 A new list is produced by evaluating each expression when the constructor is executed.
511 The empty list is formed from
515 acid: l = { 1, x, 2\eD }
518 {0x00000001 , 0x0000000a , 2 }
523 Several operators manipulate lists.
527 \f(CWhead\fP primary-expression
528 \f(CWtail\fP primary-expression
529 \f(CWappend\fP expression \f(CW,\fP primary-expression
530 \f(CWdelete\fP expression \f(CW,\fP primary-expression
533 .I primary-expression
538 must yield a value of type
540 If there are no elements in the list the value of
544 will be the empty list. Otherwise
546 evaluates to the first element of the list and
548 evaluates to the rest.
552 acid: head {1, 2, 3, 4}
554 acid: tail {1, 2, 3, 4}
555 {0x00000002 , 0x00000003 , 0x00000004 }
561 must be an expression that yields a
564 places the result of evaluating
565 .I primary-expression
566 at the end of the list.
568 .I primary-expression
571 must evaluate to an integer;
575 item from the list, where
578 .I primary-expression.
579 List indices are zero-based.
581 acid: append {1, 2}, 3
582 {0x00000001 , 0x00000002 , 0x00000003 }
583 acid: delete {1, 2, 3}, 1
584 {0x00000001 , 0x00000003 }
587 Assigning a list to a variable copies a reference to the list; if a list variable
588 is copied it still points at the same list. To copy a list, the elements must
589 be copied piecewise using
599 postfix-expression \f(CW[\fP expression \f(CW]\fP
600 postfix-expression \f(CW(\fP argument-list \f(CW)\fP
601 postfix-expression \f(CW.\fP tag
602 postfix-expression \f(CW->\fP tag
603 postfix-expression \f(CW++\fP
604 postfix-expression \f(CW--\fP
608 argument-list , expression
614 operator performs indexing.
615 The indexing expression must result in an expression of
619 The operation depends on the type of
620 .I postfix-expression .
622 .I postfix-expression
625 it is assumed to be the base address of an array in the memory image.
626 The index offsets into this array; the size of the array members is
627 determined by the format associated with the
628 .I postfix-expression .
630 .I postfix-expression
633 the index operator fetches the
636 of the string. If the index points beyond the end
637 of the string, a zero is returned.
639 .I postfix-expression
642 then the indexing operation returns the
645 If the list contains less than
655 operators increment and decrement integer variables.
656 The amount of increment or decrement depends on the format code. These postfix
657 operators return the value of the variable before the increment or decrement
662 \f(CW++\fP unary-expression
663 \f(CW--\fP unary-expression
665 unary-operator: one of
666 \f(CW*\fP \f(CW@\fP \f(CW+\fP \f(CW-\fP ~ \f(CW!\fP
672 are the indirection operators.
674 references a value from the text file of the program being debugged.
675 The size of the value depends on the format code. The
677 operator fetches a value from the memory image of a process. If either
678 operator appears on the left-hand side of an assignment statement, either the file
679 or memory will be written. The file can only be modified when Acid is invoked
687 operators perform the same operation as their postfix counterparts but
688 return the value after the increment or decrement has been performed. Since the
692 operators fetch and increment the correct amount for the specified format,
693 the following function prints correct machine instructions on a machine with
694 variable length instructions, such as the 68020 or 386:
698 addr = fmt(addr, 'i');
700 print(*addr++, "\en");
707 perform bitwise and logical negation respectively. Their operands must be of
713 unary-expression \f(CW\e\fP format-char
714 \f(CW(\fP complex-name \f(CW)\fP unary-expression
716 A unary expression may be preceded by a cast. The cast has the effect of
717 associating the value of
719 with a complex type structure.
720 The result may then be dereferenced using the
726 An Acid variable may be associated with a complex type
727 to enable accessing the type's members:
733 acid: complex List lhead
736 acid: lhead = ((List)lhead).next
742 field cannot be given a complex type automatically.
744 When entered at the top level of the interpreter,
745 an expression of complex type
746 is treated specially.
747 If the type is called
749 and an Acid function also called
752 then that function will be called with the expression as its argument.
757 will generate Acid source code defining such complex types and functions; see
762 may be qualified with a format specifier using the
764 operator. This has the same effect as passing the expression to the
768 multiplicative-expression:
770 multiplicative-expression \f(CW*\fP multiplicative-expression
771 multiplicative-expression \f(CW/\fP multiplicative-expression
772 multiplicative-expression \f(CW%\fP multiplicative-expression
778 types and perform the expected operations:
787 multiplicative-expression
788 additive-expression \f(CW+\fP multiplicative-expression
789 additive-expression \f(CW-\fP multiplicative-expression
791 These operators perform as expected for
800 do not scale the addition based on the format of the expression.
803 will always add 1 but
805 will add the size corresponding to the format stored with
807 If both operands are of either
811 type then addition is defined as concatenation.
812 Adding a string and an integer is treated as concatenation
813 with the Unicode character corresponding to the integer.
814 Subtraction is undefined for strings and lists.
818 shift-expression \f(CW<<\fP additive-expression
819 shift-expression \f(CW>>\fP additive-expression
825 operators perform bitwise right and left shifts respectively. Both
830 relational-expression:
831 relational-expression \f(CW<\fP shift-expression
832 relational-expression \f(CW>\fP shift-expression
833 relational-expression \f(CW<=\fP shift-expression
834 relational-expression \f(CW>=\fP shift-expression
837 relational-expression
838 relational-expression \f(CW==\fP equality-expression
839 relational-expression \f(CW!=\fP equality-expression
841 The comparison operators are
847 (less than or equal to),
849 (greater than or equal to),
853 (not equal to). The result of a comparison is 0
854 if the condition is false, otherwise 1. The relational operators can only be
855 applied to operands of
859 type. The equality operators apply to all types. Comparing mixed types is legal.
860 Mixed integer and float compare on the integral value. Other mixtures are always unequal.
861 Two lists are equal if they
862 have the same number of members and a pairwise comparison of the members results
867 AND-expression \f(CW&\fP equality-expression
871 XOR-expression \f(CW^\fP AND-expression
875 OR-expression \f(CW|\fP XOR-expression
877 These operators perform bitwise logical operations and apply only to the
888 logical-AND-expression:
890 logical-AND-expression \f(CW&&\fP OR-expression
892 logical-OR-expression:
893 logical-AND-expression
894 logical-OR-expression \f(CW||\fP logical-AND-expression
898 operator returns 1 if both of its operands evaluate to boolean true, otherwise 0.
901 operator returns 1 if either of its operands evaluates to boolean true,
907 \f(CWif\fP expression \f(CWthen\fP statement \f(CWelse\fP statement
908 \f(CWif\fP expression \f(CWthen\fP statement
912 is evaluated as a boolean. If its value is true the statement after
915 is executed, otherwise the statement after the
919 portion may be omitted.
921 \f(CWwhile\fP expression \f(CWdo\fP statement
925 is executed while the boolean
930 \f(CWloop\fP startexpr, endexpr \f(CWdo\fP statement
936 are evaluated prior to loop entry.
938 is evaluated while the value of
940 is less than or equal to
942 Both expressions must yield
947 incremented by one for each loop iteration.
948 Note that there is no explicit loop variable; the
952 \f(CWreturn\fP expression
955 terminates execution of the current function and returns to its caller.
956 The value of the function is given by expression. Since
958 requires an argument, nil-valued functions should return the empty list
961 \f(CWlocal\fP variable
965 statement creates a local instance of
967 which exists for the duration
968 of the instance of the function in which it is declared. Binding is dynamic: the local variable,
969 rather than the previous value of
971 is visible to called functions.
972 After a return from the current function the previous value of
977 If Acid is interrupted, the values of all local variables are lost,
978 as if the function returned.
980 \f(CWdefn\fP function-name \f(CW(\fP parameter-list \f(CW)\fP body
984 parameter-list , variable
987 \f(CW{\fP statement \f(CW}\fP
989 Functions are introduced by the
991 statement. The definition of parameter names suppresses any variables
992 of the same name until the function returns. The body of a function is a list
993 of statements enclosed by braces.
997 Acid permits the delayed evaluation of a parameter to a function. The parameter
998 may then be evaluated at any time with the
1000 operator. Such parameters are called
1002 and are defined by prefixing their name with an asterisk in their declaration.
1004 For example, this function wraps up an expression for later evaluation:
1006 acid: defn code(*e) { return e; }
1007 acid: x = code(v+atoi("100")\eD)
1011 <stdin>:5: (error) v used but not set
1017 Source Code Management
1019 Acid provides the means to examine source code. Source code is
1020 represented by lists of strings. Builtin functions provide mapping
1021 from address to lines and vice-versa. The default debugging environment
1022 has the means to load and display source files.
1026 The Acid interpreter has a number of builtin functions, which cannot be redefined.
1027 These functions perform machine- or operating system-specific functions such as
1028 symbol table and process management.
1029 The following section presents a description of each builtin function.
1032 is used to denote the empty list, which is the default value of a function that
1036 The type and number of parameters for each function are specified in the
1037 description; where a parameter can be of any type it is specified as type
1043 .ie h \&\f2\\$1\fP\ \ \f(CW\\$2(\f2\\$3\f(CW)\f1\ \ \ \ \ \ \ \ \\$4
1044 .el .tl '\f2\\$1\fP\ \ \f(CW\\$2(\f2\\$3\f(CW)\f1''\\$4'
1052 .ta 4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n +4n
1066 .Ip integer access string "Check if a file can be read
1068 returns the integer 1 if the file name in
1070 can be read by the builtin functions
1075 otherwise 0. A typical use of this function is to follow
1076 a search path looking for a source file; it is used by
1079 if access("main.c") then
1080 return file("main.c");
1085 .Ip float atof string "Convert a string to float
1087 converts the string supplied as its argument into a floating point
1088 number. The function accepts strings in the same format as the C
1089 function of the same name. The value returned has the format code
1092 returns the value 0.0 if it is unable to perform the conversion.
1094 acid: +atof("10.4e6")
1100 .Ip integer atoi string "Convert a string to an integer
1102 converts the argument
1104 to an integer value.
1105 The function accepts strings in the same format as the C function of the
1106 same name. The value returned has the format code
1109 returns the integer 0 if it is unable to perform a conversion.
1111 acid: +atoi("-1255")
1117 .Ip \f(CW{}\fP error string "Generate an interpreter error
1119 generates an error message and returns the interpreter to interactive
1120 mode. If an Acid program is running, it is aborted.
1121 Processes being debugged are not affected. The values of all local variables are lost.
1123 is commonly used to stop the debugger when some interesting condition arises
1124 in the debugged program.
1128 if *main != @main then
1129 error("memory corrupted");
1135 .Ip list file string "Read the contents of a file into a list
1137 reads the contents of the file specified by
1140 Each element in the list is a string corresponding to a line in the file.
1142 breaks lines at the newline character, but the newline
1143 characters are not returned as part each string.
1145 returns the empty list if it encounters an error opening or reading the data.
1147 acid: print(file("main.c")[0])
1153 .Ip integer filepc string "Convert source address to text address
1157 argument as a source file address in the form of a file name and line offset.
1159 uses the symbol table to map the source address into a text address
1160 in the debugged program. The
1162 return value has the format
1165 returns an address of -1 if the source address is invalid.
1166 The source file address uses the same format as
1168 This function is commonly used to set breakpoints from the source text.
1170 acid: bpset(filepc("main:10"))
1172 0x00001020 usage ADD $-0xc,R29
1177 .Ip item fmt item,fmt "Set print, \f(CW@\fP and \f(CW*\fP formats
1179 evaluates the expression
1181 and sets the format of the result to
1183 The format of a value determines how it will be printed and
1184 what kind of object will be fetched by the
1190 operator is a short-hand form of the
1192 builtin function. The
1194 function leaves the format of the
1198 acid: main=fmt(main, 'i') // as instructions
1199 acid: print(main\eX, "\et", *main)
1200 0x00001020 ADD $-64,R29
1205 .Ip fmt fmtof item "Get format
1207 evaluates the expression
1209 and returns the format of the result.
1213 acid: +fmtof("string")
1219 .Ip integer fmtsize item "Get format size
1221 evaluates the expression
1223 and returns the size in bytes of a single element of result's format.
1227 acid: +fmtsize('c'\ec)
1229 acid: +fmtsize(0\eX)
1231 acid: +fmtsize('c'\e3)
1237 .Ip list fnbound integer "Find start and end address of a function
1241 argument as an address in the text of the debugged program.
1243 returns a list containing two integers corresponding to
1244 the start and end addresses of the function containing the supplied address.
1247 address is not in the text segment of the program then the empty list is returned.
1251 to detect stepping into new functions.
1253 acid: print(fnbound(main))
1254 {0x00001050, 0x000014b8}
1259 .Ip \f(CW{}\fP follow integer "Compute follow set
1260 The follow set is defined as the set of program counter values that could result
1261 from executing an instruction.
1265 argument as a text address, decodes the instruction at
1266 that address and, with the current register set, builds a list of possible
1267 next program counter values. If the instruction at the specified address
1272 is used to plant breakpoints on
1273 all potential paths of execution. The following code fragment
1274 plants breakpoints on top of all potential following instructions.
1286 .Ip \f(CW{}\fP include string "Take input from a new file
1288 opens the file specified by
1290 and uses its contents as command input to the interpreter.
1291 The interpreter restores input to its previous source when it encounters
1292 either an end of file or an error.
1294 can be used to incrementally load symbol table information without
1295 leaving the interpreter.
1297 acid: include("/sys/src/cmd/acme/syms")
1302 .Ip \f(CW{}\fP interpret string "Take input from a string
1306 expression and uses its result as command input for the interpreter.
1307 The interpreter restores input to its previous source when it encounters
1308 either the end of string or an error. The
1310 function allows Acid programs to write Acid code for later evaluation.
1312 acid: interpret("main+10;")
1318 .Ip string itoa integer[,string] "Convert integer to string
1320 takes an integer argument and converts it into an ASCII string
1324 an alternate format string
1325 may be provided in the
1329 This function is commonly used to build
1333 acid: rc("cat /proc/"+itoa(pid)+"/segment")
1334 Stack 7fc00000 80000000 1
1335 Data 00001000 00009000 1
1336 Data 00009000 0000a000 1
1337 Bss 0000a000 0000c000 1
1342 .Ip \f(CW{}\fP kill integer "Kill a process
1344 writes a kill control message into the control file of the process
1348 If the process was previously installed by
1350 it will be removed from the list of active processes.
1353 has the same value as
1358 To continue debugging, a new process must be selected using
1360 For example, to kill all the active processes:
1363 kill(head proclist);
1364 proclist = tail proclist;
1370 .Ip list map list "Set or retrieve process memory map
1372 either retrieves all the mappings associated with a process or sets a single
1373 map entry to a new value.
1376 argument is omitted then
1378 returns a list of lists. Each sublist has four values and describes a
1379 single region of contiguous addresses in the
1380 memory or file image of the debugged program. The first entry is the name of the
1381 mapping. If the name begins with
1383 it denotes a map into the memory of an active process.
1384 The second and third values specify the base and end
1385 address of the region and the fourth number specifies the offset in the file
1386 corresponding to the first location of the region.
1387 A map entry may be set by supplying a list in the same format as the sublist
1388 described above. The name of the mapping must match a region already defined
1390 Maps are set automatically for Plan 9 processes and some kernels; they may
1391 need to be set by hand for other kernels and programs that run on bare hardware.
1393 acid: map({"text", _start, end, 0x30})
1398 .Ip integer match item,list "Search list for matching value
1400 compares each item in
1402 using the equality operator
1408 can be of any type. If the match succeeds the result is the integer index
1409 of the matching value, otherwise -1.
1411 acid: list={8,9,10,11}
1412 acid: print(list[match(10, list)]\eD)
1418 .Ip \f(CW{}\fP newproc string "Create a new process
1420 starts a new process with an argument vector constructed from
1422 The argument vector excludes the name of the program to execute and
1425 must be space separated. A new process can accept no more
1426 than 512 arguments. The internal variable
1428 is set to the pid of the newly created process. The new pid
1429 is also appended to the list of active processes stored in the variable
1431 The new process is created then halted at the first instruction, causing
1432 the debugger to call
1434 The library functions
1438 should be used to start processes when using the standard debugging
1441 acid: newproc("-l .")
1442 56720: system call _main ADD $-0x14,R29
1447 .Ip string pcfile integer "Convert text address to source file name
1451 argument as a text address in the debugged program. The address and symbol table
1452 are used to generate a string containing the name of the source file
1453 corresponding to the text address. If the address does not lie within the
1458 acid: print("Now at ", pcfile(*PC), ":", pcline(*PC))
1464 .Ip integer pcline integer "Convert text address to source line number
1468 argument as a text address in the debugged program. The address and symbol table
1469 are used to generate an integer containing the line number in the source file
1470 corresponding to the text address. If the address does not lie within the
1471 program the integer 0 is returned.
1473 acid: +file("main.c")[pcline(main)]
1474 main(int argc, char *argv[])
1479 .Ip \f(CW{}\fP print item,item,... "Print expressions
1483 supplied in its argument list and prints it to standard output. Each
1484 argument will be printed according to its associated format character.
1485 When the interpreter is executing, output is buffered and flushed every
1486 5000 statements or when the interpreter returns to interactive mode.
1488 accepts a maximum of 512 arguments.
1490 acid: print(10, "decimal ", 10\eD, "octal ", 10\eo)
1491 0x0000000a decimal 10 octal 000000000012
1492 acid: print({1, 2, 3})
1493 {0x00000001 , 0x00000002 , 0x00000003 }
1494 acid: print(main, main\ea, "\et", @main\ei)
1495 0x00001020 main ADD $-64,R29
1500 .Ip \f(CW{}\fP printto string,item,item,... "Print expressions to file
1502 offers a limited form of output redirection. The first
1504 argument is used as the path name of a new file to create.
1507 is then evaluated and printed to the newly created file. When all items
1508 have been printed the file is closed.
1510 accepts a maximum of 512 arguments.
1512 acid: printto("/env/foo", "hello")
1513 acid: rc("echo -n $foo")
1519 .Ip string rc string "Execute a shell command
1523 to form a shell command. A new command interpreter is started
1524 to execute the command. The Acid interpreter blocks until the command
1525 completes. The return value is the empty string
1526 if the command succeeds, otherwise the exit status of the failed command.
1528 acid: rc("B "+itoa(-pcline(addr))+" "+pcfile(addr));
1533 .Ip string readfile string "Read file contents into a string
1535 takes the contents of the file specified by
1537 and returns its contents as a new string.
1540 encounters a zero byte in the file, it terminates.
1543 encounters an error opening or reading the file then the empty list
1546 can be used to read the contents of device files whose lines are not
1547 terminated with newline characters.
1549 acid: ""+readfile("/dev/label")
1555 .Ip string reason integer "Print cause of program stoppage
1557 uses machine-dependent information to generate a string explaining
1558 why a process has stopped. The
1560 argument is the value of an architecture dependent status register,
1565 acid: print(reason(*CAUSE))
1571 .Ip integer regexp pattern,string "Regular expression match
1575 string supplied as its first argument with the
1577 supplied as its second.
1578 If the pattern matches the result is the value 1, otherwise 0.
1580 acid: print(regexp(".*bar", "foobar"))
1586 .Ip \f(CW{}\fP setproc integer "Set debugger focus
1588 selects the default process used for memory and control operations. It effectively
1589 shifts the focus of control between processes. The
1591 argument specifies the pid of the process to look at.
1594 is set to the pid of the selected process. If the process is being
1595 selected for the first time its pid is added to the list of active
1599 acid: setproc(68382)
1601 >68382: Stopped at main+0x4 setproc(68382)
1606 .Ip \f(CW{}\fP start integer "Restart execution
1610 message to the control file of the process specified by the pid
1615 draws an error if the process is not in the
1621 >68382: Running at main+0x4 setproc(68382)
1626 .Ip \f(CW{}\fP startstop integer "Restart execution, block until stopped
1628 performs the same actions as a call to
1630 followed by a call to
1634 argument specifies the pid of the process to control. The process
1638 Execution is restarted, the debugger then waits for the process to
1641 state. A process will stop if a startstop message has been written to its control
1642 file and any of the following conditions becomes true: the process executes or returns from
1643 a system call, the process generates a trap or the process receives a note.
1645 is used to implement single stepping.
1647 acid: startstop(pid)
1648 75374: breakpoint ls ADD $-0x16c8,R29
1653 .Ip string status integer "Return process state
1655 uses the pid supplied by its
1657 argument to generate a string describing the state of the process.
1658 The string corresponds to the state returned by the
1662 A process must be in the
1664 state to modify its memory or registers.
1666 acid: ""+status(pid)
1672 .Ip \f(CW{}\fP stop integer "Wait for a process to stop
1676 message to the control file of the process specified by the
1680 The interpreter blocks until the debugged process enters the
1683 A process will stop if a stop message has been written to its control
1684 file and any of the following conditions becomes true: the process executes or returns from
1685 a system call, the process generates a trap, the process is scheduled or the
1686 process receives a note.
1688 is used to wait for a process to halt before planting a breakpoint since Plan 9
1689 only allows a process's memory to be written while it is in the
1694 if (status(pid)!="Stopped") then {
1695 print("Waiting...\en");
1704 .Ip list strace pc,sp,linkreg "Stack trace
1706 generates a list of lists corresponding to procedures called by the debugged
1707 program. Each sublist describes a single stack frame in the active process.
1708 The first element is an
1712 specifying the address of the called function. The second element is the value
1713 of the program counter when the function was called. The third and fourth elements
1714 contain lists of parameter and automatic variables respectively.
1715 Each element of these lists
1716 contains a string with the name of the variable and an
1720 containing the current value of the variable.
1723 are the current value of the program counter, the current value of the
1724 stack pointer, and the address of the link register. All three parameters
1728 is architecture dependent. On the MIPS linkreg is set to the address of saved
1730 on the SPARC to the address of saved
1732 For the other architectures
1734 is not used, but must point to valid memory.
1736 acid: print(strace(*PC, *SP, linkreg))
1737 {{0x0000141c, 0xc0000f74,
1738 {{"s", 0x0000004d}, {"multi", 0x00000000}},
1739 {{"db", 0x00000000}, {"fd", 0x000010a4},
1740 {"n", 0x00000001}, {"i", 0x00009824}}}}
1745 .Ip \f(CW{}\fP waitstop integer "Wait for a process to stop
1747 writes a waitstop message to the control file of the process specified by the
1751 The interpreter will remain blocked until the debugged process enters the
1754 A process will stop if a waitstop message has been written to its control
1755 file and any of the following conditions becomes true: the process generates a trap
1756 or receives a note. Unlike
1760 function is passive; it does not itself cause the program to stop.
1763 75374: breakpoint ls ADD $-0x16c8,R29
1771 A standard debugging environment is provided by modules automatically
1774 These modules are located in the directory
1776 These functions may be overridden, personalized, or added to by code defined in
1777 .CW $home/lib/acid .
1778 The implementation of these functions can be examined using the
1780 operator and then modified during debugging sessions.
1784 .Ip \f(CW{}\fP Bsrc integer "Load editor with source
1788 argument as a text address. The text address is used to produce a pathname
1789 and line number suitable for the
1792 to send to the text editor
1801 which either selects an existing source file or loads a new source file into the editor.
1802 The line of source corresponding to the text address is then selected.
1803 In the following example
1805 is redefined so that the editor
1806 follows and displays the source line currently being executed.
1816 .Ip \f(CW{}\fP Fpr "" "Display double precision floating registers
1817 For machines equipped with floating point,
1819 displays the contents of the floating point registers as double precision
1831 .Ip \f(CW{}\fP Ureg integer "Display contents of Ureg structure
1833 interprets the integer passed as its first argument as the address of a
1836 structure. Each element of the structure is retrieved and printed.
1837 The size and contents of the
1839 structure are architecture dependent.
1840 This function can be used to decode the first argument passed to a
1842 function after a process has received a note.
1844 acid: Ureg(*notehandler:ur)
1854 .Ip \f(CW{}\fP acidinit "" "Interpreter startup
1856 is called by the interpreter after all
1857 modules have been loaded at initialization time.
1858 It is used to set up machine specific variables and the default source path.
1860 should not be called by user code.
1865 .Ip \f(CW{}\fP addsrcdir string "Add element to source search path
1867 interprets its string argument as a new directory
1869 should search when looking for source code files.
1871 draws an error if the directory is already in the source search path. The search
1872 path may be examined by looking at the variable
1875 acid: rc("9fs fornax")
1876 acid: addsrcpath("/n/fornax/sys/src/cmd")
1881 .Ip \f(CW{}\fP asm integer "Disassemble machine instructions
1883 interprets its integer argument as a text address from which to disassemble
1884 machine instructions.
1886 prints the instruction address in symbolic and hexadecimal form, then prints
1887 the instructions with addressing modes. Up to twenty instructions will
1890 stops disassembling when it reaches the end of the current function.
1891 Instructions are read from the file image using the
1896 main 0x00001020 ADD $-0x64,R29
1897 main+0x4 0x00001024 MOVW R31,0x0(R29)
1898 main+0x8 0x00001028 MOVW R1,argc+4(FP)
1899 main+0xc 0x0000102c MOVW $bin(SB),R1
1904 .Ip \f(CW{}\fP bpdel integer "Delete breakpoint
1906 removes a previously set breakpoint from memory.
1909 supplied as its argument must be the address of a previously set breakpoint.
1910 The breakpoint address is deleted from the active breakpoint list
1912 then the original instruction is copied from the file image to the memory
1913 image so that the breakpoint is removed.
1920 .Ip \f(CW{}\fP bpset integer "Set a breakpoint
1922 places a breakpoint instruction at the address specified
1925 argument, which must be in the text segment.
1927 draws an error if a breakpoint has already been set at the specified address.
1928 A list of current breakpoints is maintained in the variable
1932 breakpoints are left in memory even when a process is stopped, and
1933 the process must exist, perhaps by being
1938 in order to place a breakpoint.
1940 accepts breakpoint commands before the process is started.)
1942 MIPS and SPARC architectures,
1943 breakpoints at function entry points should be set 4 bytes into the function
1945 instruction scheduler may fill
1947 branch delay slots with the first instruction of the function.
1954 .Ip \f(CW{}\fP bptab "" "List active breakpoints
1956 prints a list of currently installed breakpoints. The list contains the
1957 breakpoint address in symbolic and hexadecimal form as well as the instruction
1958 the breakpoint replaced. Breakpoints are not maintained across process creation
1963 They are maintained across a fork, but care must be taken to keep control of
1968 0x00001420 ls+0x4 MOVW R31,0x0(R29)
1973 .Ip \f(CW{}\fP casm "" "Continue disassembly
1975 continues to disassemble instructions from where the last
1979 command stopped. Like
1981 this command stops disassembling at function boundaries.
1984 main+0x10 0x00001030 MOVW $0x1,R3
1985 main+0x14 0x00001034 MOVW R3,0x8(R29)
1986 main+0x18 0x00001038 MOVW $0x1,R5
1987 main+0x1c 0x0000103c JAL Binit(SB)
1992 .Ip \f(CW{}\fP cont "" "Continue program execution
1994 restarts execution of the currently active process.
1995 If the process is stopped on a breakpoint, the breakpoint is first removed,
1996 the program is single stepped, the breakpoint is replaced and the program
1997 is then set executing. This may cause
2001 causes the interpreter to block until the process enters the
2006 95197: breakpoint ls+0x4 MOVW R31,0x0(R29)
2011 .Ip \f(CW{}\fP dump integer,integer,string "Formatted memory dump
2013 interprets its first argument as an address, its second argument as a
2014 count and its third as a format string.
2016 fetches an object from memory at the current address and prints it according
2017 to the format. The address is incremented by the number of bytes specified by
2018 the format and the process is repeated count times. The format string is any
2019 combination of format characters, each preceded by an optional count.
2022 prints the address in hexadecimal, a colon, the object and then a newline.
2026 to fetch each object.
2028 acid: dump(main+35, 4, "X2bi")
2029 0x00001043: 0x0c8fa700 108 143 lwc2 r0,0x528f(R4)
2030 0x0000104d: 0xa9006811 0 0 swc3 r0,0x0(R24)
2031 0x00001057: 0x2724e800 4 37 ADD $-0x51,R23,R31
2032 0x00001061: 0xa200688d 6 0 NOOP
2033 0x0000106b: 0x2710c000 7 0 BREAK
2038 .Ip \f(CW{}\fP findsrc string "Use source path to load source file
2042 argument as a source file. Each directory in the source path is searched
2043 in turn for the file. If the file is found, the source text is loaded using
2045 and stored in the list of active source files called
2047 The name of the file is added to the source file name list
2049 Users are unlikely to call
2051 from the command line, but may use it from scripts to preload source files
2052 for a debugging session. This function is used by
2056 to locate and load source code. The default search path for the MIPS
2059 .CW /sys/src/libc/port ,
2060 .CW /sys/src/libc/9sys ,
2061 .CW /sys/src/libc/mips .
2063 acid: findsrc(pcfile(main));
2068 .Ip \f(CW{}\fP fpr "" "Display single precision floating registers
2069 For machines equipped with floating point,
2071 displays the contents of the floating point registers as single precision
2072 values. When the interpreter stores or manipulates floating point values
2073 it converts into double precision values.
2084 .Ip \f(CW{}\fP func "" "Step while in function
2086 single steps the active process until it leaves the current function
2087 by either calling another function or returning to its caller.
2089 will execute a single instruction after leaving the current function.
2092 95197: breakpoint ls+0x8 MOVW R1,R8
2093 95197: breakpoint ls+0xc MOVW R8,R1
2094 95197: breakpoint ls+0x10 MOVW R8,s+4(FP)
2095 95197: breakpoint ls+0x14 MOVW $0x2f,R5
2096 95197: breakpoint ls+0x18 JAL utfrrune(SB)
2097 95197: breakpoint utfrrune ADD $-0x18,R29
2102 .Ip \f(CW{}\fP gpr "" "Display general purpose registers
2104 prints the values of the general purpose processor registers.
2107 R1 0x00009562 R2 0x000010a4 R3 0x00005d08
2108 R4 0x0000000a R5 0x0000002f R6 0x00000008
2114 .Ip \f(CW{}\fP labstk integer "Print stack trace from label
2116 performs a stack trace from a Plan 9
2119 C compilers store continuations in a common format. Since the
2120 compilers all use caller save conventions a continuation may be saved by
2125 pair. This data structure is called a label and is used by the
2128 and the kernel to schedule threads and processes.
2132 argument as the address of a label and produces a stack trace for
2133 the thread of execution. The value of the function
2135 is a suitable argument for
2138 acid: labstk(*mousetid)
2139 At pc:0x00021a70:Rendez_Sleep+0x178 rendez.l:44
2140 Rendez_Sleep(r=0xcd7d8,bool=0xcd7e0,t=0x0) rendez.l:5
2141 called from ALEF_rcvmem+0x198 recvmem.l:45
2142 ALEF_rcvmem(c=0x000cd764,l=0x00000010) recvmem.l:6
2148 .Ip \f(CW{}\fP lstk "" "Stack trace with local variables
2150 produces a long format stack trace.
2151 The stack trace includes each function in the stack,
2152 where it was called from, and the value of the parameters and automatic
2153 variables for each function.
2155 displays the value rather than the address of each variable and all
2156 variables are assumed to be an integer in format
2158 To print a variable in its correct format use the
2160 operator to find the address and apply the appropriate format before indirection
2163 operator. It may be necessary to single step a couple of instructions into
2164 a function to get a correct stack trace because the frame pointer adjustment
2165 instruction may get scheduled down into the body of the function.
2168 At pc:0x00001024:main+0x4 ls.c:48
2169 main(argc=0x00000001,argv=0x7fffefec) ls.c:48
2170 called from _main+0x20 main9.s:10
2180 .Ip \f(CW{}\fP mem integer,string "Print memory object
2182 interprets its first
2184 argument as the address of an object to be printed according to the
2185 format supplied in its second
2188 The format string can be any combination of format characters, each preceded
2189 by an optional count.
2191 acid: mem(bdata+0x326, "2c2Xb")
2192 P = 0xa94bc464 0x3e5ae44d 19
2197 .Ip \f(CW{}\fP new "" "Create new process
2199 starts a new copy of the debugged program. The new program is started
2200 with the program arguments set by the variable
2202 The new program is stopped in the second instruction of
2204 The breakpoint list is reinitialized.
2206 may be used several times to instantiate several copies of a program
2207 simultaneously. The user can rotate between the copies using
2212 60: external interrupt _main ADD $-0x14,R29
2213 60: breakpoint main+0x4 MOVW R31,0x0(R29)
2218 .Ip \f(CW{}\fP next "" "Step through language statement
2220 steps through a single language level statement without tracing down
2221 through each statement in a called function. For each statement,
2223 prints the machine instructions executed as part of the statement. After
2224 the statement has executed, source lines around the current program
2225 counter are displayed.
2228 60: breakpoint Binit+0x4 MOVW R31,0x0(R29)
2229 60: breakpoint Binit+0x8 MOVW f+8(FP),R4
2233 90 Binit(Biobuf *bp, int f, int mode)
2235 >92 return Binits(bp, f, mode, bp->b, BSIZE);
2241 .Ip \f(CW{}\fP notestk integer "Stack trace after receiving a note
2245 argument as the address of a
2247 structure passed by the kernel to a
2249 function during note processing.
2254 and link register from the
2256 to print a stack trace corresponding to the point in the program where the note
2258 To get a valid stack trace on the MIPS and SPARC architectures from a notify
2259 routine, the program must stop in a new function called from the notify routine
2260 so that the link register is valid and the notify routine's parameters are
2263 acid: notestk(*notify:ur)
2264 Note pc:0x00001024:main+0x4 ls.c:48
2265 main(argc=0x00000001,argv=0x7fffefec) ls.c:48
2266 called from _main+0x20 main9.s:10
2273 .Ip \f(CW{}\fP pfl integer "Print source file and line
2275 interprets its argument as a text address and uses it to print
2276 the source file and line number corresponding to the address. The output
2277 has the same format as file addresses in
2286 .Ip \f(CW{}\fP procs "" "Print active process list
2288 prints a list of active process attached to the debugger. Each process
2289 produces a single line of output giving the pid, process state, the address
2290 the process is currently executing, and the
2292 command required to make that process current.
2293 The current process is marked in the first column with a
2295 character. The debugger maintains a list of processes in the variable
2299 >62: Stopped at main+0x4 setproc(62)
2300 60: Stopped at Binit+0x8 setproc(60)
2305 .Ip \f(CW{}\fP pstop integer "Print reason process stopped
2307 prints the status of the process specified by the
2309 pid supplied as its argument.
2311 is usually called from
2313 every time a process enters the
2318 0x0000003e: breakpoint main+0x4 MOVW R31,0x0(R29)
2323 .Ip \f(CW{}\fP regs "" "Print registers
2325 prints the contents of both the general and special purpose registers.
2331 to display the contents of the registers.
2336 .Ip \f(CW{}\fP source "" "Summarize source data base
2338 prints the directory search path followed by a list of currently loaded
2339 source files. The source management functions
2343 use the search path to locate and load source files. Source files are
2344 loaded incrementally into a source data base during debugging. A list
2345 of loaded files is stored in the variable
2347 and the contents of each source file in the variable
2351 /n/bootes/sys/src/libbio/
2361 .Ip \f(CW{}\fP spr "" "Print special purpose registers
2363 prints the contents of the processor control and memory management
2364 registers. Where possible, the contents of the registers are decoded
2365 to provide extra information; for example the
2367 register on the MIPS is
2368 printed both in hexadecimal and using the
2373 PC 0x00001024 main+0x4 ls.c:48
2374 SP 0x7fffef68 LINK 0x00006264 _main+0x28 main9.s:12
2375 STATUS 0x0000ff33 CAUSE 0x00000024 breakpoint
2376 TLBVIR 0x000000d3 BADVADR 0x00001020
2377 HI 0x00000004 LO 0x00001ff7
2382 .Ip \f(CW{}\fP src integer "Print lines of source
2386 argument as a text address and uses this address to print 5 lines
2387 of source before and after the address. The current line is marked with a
2391 uses the source search path maintained by
2395 to locate the required source files.
2404 >47 main(int argc, char *argv[])
2409 52 Binit(&bin, 1, OWRITE);
2414 .Ip \f(CW{}\fP step "" "Single step process
2416 causes the debugged process to execute a single machine level instruction.
2417 If the program is stopped on a breakpoint set by
2419 it is first removed, the single step executed, and the breakpoint replaced.
2423 to predict the address of the program counter after the current instruction
2424 has been executed. A breakpoint is placed at each of these predicted addresses
2425 and the process is started. When the process stops the breakpoints are removed.
2428 62: breakpoint main+0x8 MOVW R1,argc+4(FP)
2433 .Ip \f(CW{}\fP stk "" "Stack trace
2435 produces a short format stack trace. The stack trace includes each function
2436 in the stack, where it was called from, and the value of the parameters.
2437 The short format omits the values of automatic variables.
2438 Parameters are assumed to be integer values in the format
2440 to print a parameter in the correct format use the
2442 to obtain its address, apply the correct format, and use the
2444 indirection operator to find its value.
2445 It may be necessary to single step a couple of instructions into
2446 a function to get a correct stack trace because the frame pointer adjustment
2447 instruction may get scheduled down into the body of the function.
2450 At pc:0x00001028:main+0x8 ls.c:48
2451 main(argc=0x00000002,argv=0x7fffefe4) ls.c:48
2452 called from _main+0x20 main9.s:10
2457 .Ip \f(CW{}\fP stmnt "" "Execute a single statement
2459 executes a single language level statement.
2461 displays each machine level instruction as it is executed. When the executed
2462 statement is completed the source for the next statement is displayed.
2467 function will trace down through function calls.
2470 62: breakpoint main+0x18 MOVW R5,0xc(R29)
2471 62: breakpoint main+0x1c JAL Binit(SB)
2472 62: breakpoint Binit ADD $-0x18,R29
2475 90 Binit(Biobuf *bp, int f, int mode)
2481 .Ip \f(CW{}\fP stopped integer "Report status of stopped process
2483 is called automatically by the interpreter
2484 every time a process enters the
2486 state, such as when it hits a breakpoint.
2487 The pid is passed as the
2489 argument. The default implementation just calls
2491 but the function may be changed to provide more information or perform fine control
2492 of execution. Note that
2494 should return; for example, calling
2498 will recur until the interpreter runs out of stack space.
2500 acid: defn stopped(pid) {
2501 if *lflag != 0 then error("lflag modified");
2503 acid: progargs = "-l"
2505 acid: while 1 do step();
2506 <stdin>:7: (error) lflag modified
2508 At pc:0x00001220:main+0x200 ls.c:54
2509 main(argc=0x00000001,argv=0x7fffffe8) ls.c:48
2510 called from _main+0x20 main9.s:10
2515 .Ip \f(CW{}\fP symbols string "Search symbol table
2517 uses the regular expression supplied by
2519 to search the symbol table for symbols whose name matches the
2522 acid: symbols("main")
2529 .Ip \f(CW{}\fP win "" "Start new process in a window
2531 performs exactly the same function as
2533 but uses the window system to create a new window for the debugged process.
2536 supplies arguments to the new process.
2537 The environment variable
2539 must be set to allow the interpreter to locate the mount channel for the
2541 The window is created in the top left corner of the screen and is
2542 400x600 pixels in size. The
2544 function may be modified to alter the geometry.
2545 The window system will not be able to deliver notes in the new window
2546 since the pid of the created process is not passed when the server is
2547 mounted to create a new window.