Use macros for 8259A PIC registers, instead of writing them literally.
[pintos-anon] / doc / devel.texi
1 @node Development Tools
2 @appendix Development Tools
3
4 Here are some tools that you might find useful while developing code.
5
6 @menu
7 * Tags::
8 * cscope::
9 * CVS::
10 @ifset recommendvnc
11 * VNC::
12 @end ifset 
13 @ifset recommendcygwin
14 * Cygwin::
15 @end ifset
16 @end menu
17
18 @node Tags
19 @section Tags
20
21 Tags are an index to the functions and global variables declared in a
22 program.  Many editors, including Emacs and @command{vi}, can use
23 them.  The @file{Makefile} in @file{pintos/src} produces Emacs-style
24 tags with the command @code{make TAGS} or @command{vi}-style tags with
25 @code{make tags}.
26
27 In Emacs, use @kbd{M-.} to follow a tag in the current window,
28 @kbd{C-x 4 .} in a new window, or @kbd{C-x 5 .} in a new frame.  If
29 your cursor is on a symbol name for any of those commands, it becomes
30 the default target.  If a tag name has multiple definitions, @kbd{M-0
31 M-.} jumps to the next one.  To jump back to where you were before
32 you followed the last tag, use @kbd{M-*}.
33
34 @node cscope
35 @section cscope
36
37 The @command{cscope} program also provides an index to functions and
38 variables declared in a program.  It has some features that tag
39 facilities lack.  Most notably, it can find all the points in a
40 program at which a given function is called.
41
42 The @file{Makefile} in @file{pintos/src} produces @command{cscope}
43 indexes when it is invoked as @code{make cscope}.  Once the index has
44 been generated, run @command{cscope} from a shell command line; no
45 command-line arguments are normally necessary.  Then use the arrow
46 keys to choose one of the search criteria listed near the bottom of
47 the terminal, type in an identifier, and hit @key{Enter}.
48 @command{cscope} will then display the matches in the upper part of
49 the terminal.  You may use the arrow keys to choose a particular
50 match; if you then hit @key{Enter}, @command{cscope} will invoke the
51 default system editor@footnote{This is typically @command{vi}.  To
52 exit @command{vi}, type @kbd{: q @key{Enter}}.} and position the
53 cursor on that match.  To start a new search, type @key{Tab}.  To exit
54 @command{cscope}, type @kbd{Ctrl-d}.
55
56 Emacs and some versions of @command{vi} have their own interfaces to
57 @command{cscope}.  For information on how to use these interface,
58 visit @url{http://cscope.sourceforge.net, the @command{cscope} home
59 page}.
60
61 @node CVS
62 @section CVS
63
64 CVS is a version-control system.  That is, you can use it to keep
65 track of multiple versions of files.  The idea is that you do some
66 work on your code and test it, then check it into the version-control
67 system.  If you decide that the work you've done since your last
68 check-in is no good, you can easily revert to the last checked-in
69 version.  Furthermore, you can retrieve any old version of your code
70 as of some given day and time.  The version control logs tell you who
71 made changes and when.
72
73 CVS is not the best version control system out there, but it's
74 free, it's fairly easy to use, and it's already installed in most
75 Unix-like environments.
76
77 For more information, visit the @uref{https://www.cvshome.org/, , CVS
78 home page}.
79
80 @include localcvsinstructions.texi
81
82 @ifset recommendvnc
83 @node VNC
84 @section VNC
85
86 VNC stands for Virtual Network Computing.  It is, in essence, a remote
87 display system which allows you to view a computing ``desktop''
88 environment not only on the machine where it is running, but from
89 anywhere on the Internet and from a wide variety of machine
90 architectures.  It is already installed on the lab machines.  
91 For more information, look at the @uref{http://www.realvnc.com/, , VNC
92 Home Page}.
93 @end ifset
94
95 @ifset recommendcygwin
96 @node Cygwin
97 @section Cygwin
98
99 @uref{http://cygwin.com/, ,Cygwin} provides a Linux-compatible environment
100 for Windows.  It includes ssh client and an X11 server, Cygwin/X.  If your
101 primary work environment is Windows, you will find Cygwin/X extremely
102 useful for these projects.  Install Cygwin/X, then start the X server
103 and open a new xterm.  The X11 server also allows you to run pintos while
104 displaying the bochs- or qemu-emulated console on your Windows desktop.
105 @end ifset
106
107 @localdevelopmenttools{}
108