summaryrefslogtreecommitdiffstats
path: root/doc/pintos_9.html
blob: b63a0bae25beabbd1432455de5b67197540d9cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html40/loose.dtd">
<HTML>
<!-- Created on March, 6 2012 by texi2html 1.66 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<HEAD>
<TITLE>Pintos Projects: Development Tools</TITLE>

<META NAME="description" CONTENT="Pintos Projects: Development Tools">
<META NAME="keywords" CONTENT="Pintos Projects: Development Tools">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.66">
<LINK REL="stylesheet" HREF="pintos.css">
</HEAD>

<BODY >

<A NAME="SEC109"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_8.html#SEC96"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_9.html#SEC110"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>

<HR SIZE=2>
<H1> E. Development Tools </H1>
<!--docid::SEC109::-->
<P>

Here are some tools that you might find useful while developing code.
</P>
<P>

<A NAME="Tags"></A>
<HR SIZE="6">
<A NAME="SEC110"></A>
<H2> E.1 Tags </H2>
<!--docid::SEC110::-->
<P>

Tags are an index to the functions and global variables declared in a
program.  Many editors, including Emacs and <CODE>vi</CODE>, can use
them.  The <Q><TT>Makefile</TT></Q> in <Q><TT>pintos/src</TT></Q> produces Emacs-style
tags with the command <CODE>make TAGS</CODE> or <CODE>vi</CODE>-style tags with
<CODE>make tags</CODE>.
</P>
<P>

In Emacs, use <KBD>M-.</KBD> to follow a tag in the current window,
<KBD>C-x 4 .</KBD> in a new window, or <KBD>C-x 5 .</KBD> in a new frame.  If
your cursor is on a symbol name for any of those commands, it becomes
the default target.  If a tag name has multiple definitions, <KBD>M-0
M-.</KBD> jumps to the next one.  To jump back to where you were before
you followed the last tag, use <KBD>M-*</KBD>.
</P>
<P>

<A NAME="cscope"></A>
<HR SIZE="6">
<A NAME="SEC111"></A>
<H2> E.2 cscope </H2>
<!--docid::SEC111::-->
<P>

The <CODE>cscope</CODE> program also provides an index to functions and
variables declared in a program.  It has some features that tag
facilities lack.  Most notably, it can find all the points in a
program at which a given function is called.
</P>
<P>

The <Q><TT>Makefile</TT></Q> in <Q><TT>pintos/src</TT></Q> produces <CODE>cscope</CODE>
indexes when it is invoked as <CODE>make cscope</CODE>.  Once the index has
been generated, run <CODE>cscope</CODE> from a shell command line; no
command-line arguments are normally necessary.  Then use the arrow
keys to choose one of the search criteria listed near the bottom of
the terminal, type in an identifier, and hit <KBD>Enter</KBD>.
<CODE>cscope</CODE> will then display the matches in the upper part of
the terminal.  You may use the arrow keys to choose a particular
match; if you then hit <KBD>Enter</KBD>, <CODE>cscope</CODE> will invoke the
default system editor<A NAME="DOCF7" HREF="pintos_fot.html#FOOT7">(7)</A> and position the
cursor on that match.  To start a new search, type <KBD>Tab</KBD>.  To exit
<CODE>cscope</CODE>, type <KBD>Ctrl-d</KBD>.
</P>
<P>

Emacs and some versions of <CODE>vi</CODE> have their own interfaces to
<CODE>cscope</CODE>.  For information on how to use these interface,
visit <A HREF="http://cscope.sourceforge.net, the &lt;CODE&gt;cscope&lt;/CODE&gt; home
page">http://cscope.sourceforge.net, the <CODE>cscope</CODE> home
page</A>.
</P>
<P>

<A NAME="git"></A>
<HR SIZE="6">
<A NAME="SEC112"></A>
<H2> E.3 git </H2>
<!--docid::SEC112::-->
<P>

git is a version-control system.  That is, you can use it to keep
track of multiple versions of files.  The idea is that you do some
work on your code and test it, then check it into the version-control
system.  If you decide that the work you've done since your last
check-in is no good, you can easily revert to the last checked-in
version.  Furthermore, you can retrieve any old version of your code
as of some given day and time.  The version control logs tell you who
made changes and when.
</P>
<P>

<A NAME="Bibliography"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_9.html#SEC109"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_10.html#SEC113"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="pintos_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by on <I>March, 6 2012</I>
using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
</FONT>

</BODY>
</HTML>