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