1 | % https://github.com/lynnt/SE499-report
|
---|
2 |
|
---|
3 | %% ----------------------------------------------------------------
|
---|
4 | %% Thesis.tex -- MAIN FILE (the one that you compile with LaTeX)
|
---|
5 | %% ----------------------------------------------------------------
|
---|
6 |
|
---|
7 | % Set up the document
|
---|
8 | \documentclass[legalpaper, 11pt, oneside]{Thesis} % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
|
---|
9 | \graphicspath{Figures/} % Location of the graphics files (set up for graphics to be in PDF format)
|
---|
10 |
|
---|
11 | % Include any extra LaTeX packages required
|
---|
12 | \usepackage{times}
|
---|
13 | \usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography
|
---|
14 | \usepackage{verbatim} % Needed for the "comment" environment to make LaTeX comments
|
---|
15 | \usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
|
---|
16 | \usepackage[pagewise]{lineno}
|
---|
17 | \usepackage{listings}
|
---|
18 |
|
---|
19 | \usepackage{etoolbox} % for robustify
|
---|
20 | \usepackage[dvipsnames]{xcolor}
|
---|
21 | \usepackage{listings}
|
---|
22 | \lstset{moredelim=**[is][\color{red}]{`}{`}}
|
---|
23 | \hypersetup{urlcolor=blue, colorlinks=true} % Colours hyperlinks in blue, but this can be distracting if there are many links.
|
---|
24 | %\urlstyle{sf}
|
---|
25 | %% ----------------------------------------------------------------
|
---|
26 | \newcommand{\CFAIcon}{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\xspace} % Cforall symbolic name
|
---|
27 | \newcommand{\CFA}{\protect\CFAIcon} % safe for section/caption
|
---|
28 | \newcommand{\CC}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
|
---|
29 | \newcommand{\uC}{$\mu$\CC}
|
---|
30 |
|
---|
31 |
|
---|
32 | \begin{document}
|
---|
33 | \frontmatter % Begin Roman style (i, ii, iii, iv...) page numbering
|
---|
34 | %\linenumbers % TODO: remove this please
|
---|
35 | % Set up the Title Page
|
---|
36 | \title{GNU Debugger support for \uC and \CFA}
|
---|
37 | \authors {\texorpdfstring
|
---|
38 | {\href{tmltran@uwaterloo.ca}{Thi My Linh Tran}}
|
---|
39 | {Thi My Linh Tran}
|
---|
40 | }
|
---|
41 | \emails{tmltran@uwaterloo.ca}
|
---|
42 | \addresses {\groupname\\\deptname\\\univname} % Do not change this here, instead these must be set in the "Thesis.cls" file, please look through it instead
|
---|
43 | \date {\today}
|
---|
44 | \subject {}
|
---|
45 | \keywords {}
|
---|
46 | \maketitle
|
---|
47 | \setcounter{page}{2}
|
---|
48 | %% ----------------------------------------------------------------
|
---|
49 |
|
---|
50 | \setstretch{1.3} % It is better to have smaller font and larger line spacing than the other way round
|
---|
51 |
|
---|
52 | % Define the page headers using the FancyHdr package and set up for one-sided printing
|
---|
53 | \fancyhead{} % Clears all page headers and footers
|
---|
54 | \rhead{\thepage} % Sets the right side header to show the page number
|
---|
55 | \lhead{} % Clears the left side page header
|
---|
56 |
|
---|
57 | % Reduce size of section titles
|
---|
58 | \makeatletter
|
---|
59 | \renewcommand\section{\@startsection{section}{1}{\z@}{-1.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\large\bfseries}}
|
---|
60 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-1.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
|
---|
61 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-1.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
|
---|
62 | \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
|
---|
63 | \makeatother
|
---|
64 |
|
---|
65 | \lstset{numberstyle=\scriptsize\sffamily}
|
---|
66 |
|
---|
67 | \pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers
|
---|
68 |
|
---|
69 | %% ----------------------------------------------------------------
|
---|
70 | % The Abstract Page
|
---|
71 | \addtotoc{Preface} % Add the "Abstract" page entry to the Contents
|
---|
72 | \preface{
|
---|
73 | \addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics
|
---|
74 |
|
---|
75 | The goal of this work is to add GNU Debugger support for the language \uC and \CFA. To
|
---|
76 | achieve this goal for \uC, new extensions are written to provide additional
|
---|
77 | support for high-level constructs that are unknown to the GNU Debugger. In addition to the work done for
|
---|
78 | \uC, many hooks are added in the GNU Debugger to enable the addition of a \CFA
|
---|
79 | demangler.
|
---|
80 |
|
---|
81 | This report assumes the reader has basic knowledge of compiler construction.
|
---|
82 | Background knowledge about how the GNU Debugger works and specific features of \uC and
|
---|
83 | \CFA
|
---|
84 | are provided in the report.
|
---|
85 | }
|
---|
86 |
|
---|
87 | \clearpage % Abstract ended, start a new page
|
---|
88 | %% ----------------------------------------------------------------
|
---|
89 |
|
---|
90 | \setstretch{1.3} % Reset the line-spacing to 1.3 for body text (if it has changed)
|
---|
91 |
|
---|
92 | % The Acknowledgements page, for thanking everyone
|
---|
93 | \acknowledgements{
|
---|
94 | \addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics
|
---|
95 |
|
---|
96 | I would like to thank Professor Peter Buhr and Thierry
|
---|
97 | Delisle for their guidance throughout the development of this project. The
|
---|
98 | GNU Debugger's internal manual \cite{Reference5} is used as a guide for the development of
|
---|
99 | adding a demangler for \CFA, and \CFA's main page \cite{Reference13} for
|
---|
100 | background knowledge and examples.
|
---|
101 | }
|
---|
102 | \clearpage % End of the Acknowledgements
|
---|
103 | %% ----------------------------------------------------------------
|
---|
104 |
|
---|
105 | \pagestyle{fancy} %The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back
|
---|
106 |
|
---|
107 |
|
---|
108 | %% ----------------------------------------------------------------
|
---|
109 | \lhead{\emph{Contents}} % Set the left side page header to "Contents"
|
---|
110 | \addcontentsline{toc}{chapter}{Listings}
|
---|
111 | \tableofcontents % Write out the Table of Contents
|
---|
112 |
|
---|
113 | %% ----------------------------------------------------------------
|
---|
114 | %\lhead{\emph{List of Figures}} % Set the left side page header to "List if Figures"
|
---|
115 | %\listoffigures % Write out the List of Figures
|
---|
116 |
|
---|
117 | %% ----------------------------------------------------------------
|
---|
118 | %\lhead{\emph{List of Tables}} % Set the left side page header to "List of Tables"
|
---|
119 | %\listoftables % Write out the List of Tables
|
---|
120 |
|
---|
121 | %% ----------------------------------------------------------------
|
---|
122 | \lhead{\emph{List of Listings}} % Set the left side page header to "List of Listings"
|
---|
123 | \lstlistoflistings
|
---|
124 |
|
---|
125 | %% ----------------------------------------------------------------
|
---|
126 | \setstretch{1.5} % Set the line spacing to 1.5, this makes the following tables easier to read
|
---|
127 | %\clearpage % Start a new page
|
---|
128 | %\lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations"
|
---|
129 | %\listofsymbols{ll} % Include a list of Abbreviations (a table of two columns)
|
---|
130 | %{
|
---|
131 | % \textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\
|
---|
132 | %\textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere \\
|
---|
133 | %\textbf{GDB} & GNU Debugger \\
|
---|
134 | %\textbf{API} & Application Programming Interface \\
|
---|
135 | %}
|
---|
136 |
|
---|
137 | %% ----------------------------------------------------------------
|
---|
138 | \clearpage % Start a new page
|
---|
139 | %% ----------------------------------------------------------------
|
---|
140 | % End of the pre-able, contents and lists of things
|
---|
141 | % Begin the Dedication page
|
---|
142 |
|
---|
143 | \setstretch{1.3} % Return the line spacing back to 1.3
|
---|
144 |
|
---|
145 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
|
---|
146 |
|
---|
147 |
|
---|
148 | %% ----------------------------------------------------------------
|
---|
149 | \mainmatter % Begin normal, numeric (1,2,3...) page numbering
|
---|
150 | \pagestyle{fancy} % Return the page headers back to the "fancy" style
|
---|
151 |
|
---|
152 | % Include the chapters of the thesis, as separate files
|
---|
153 | % Just uncomment the lines as you write the chapters
|
---|
154 |
|
---|
155 | \lhead{\emph{Introduction}} % Set the left side page header to "Abbreviations"
|
---|
156 | \input{Chapters/Introduction} % Introduction
|
---|
157 | % Background
|
---|
158 | \clearpage % Start a new page
|
---|
159 | \lhead{\emph{\uC}} % Set the left side page header to "Abbreviations"
|
---|
160 | \input{Chapters/uCPP}
|
---|
161 | \clearpage %Start a new page
|
---|
162 | \lhead{\emph{GNU Debugger}} % Set the left side page header to "Abbreviations"
|
---|
163 | \input{Chapters/GDB}
|
---|
164 | \clearpage %Start a new page
|
---|
165 | \lhead{\emph{\CFA}} % Set the left side page header to "Abbreviations"
|
---|
166 | \input{Chapters/CFA}
|
---|
167 | \clearpage %Start a new page
|
---|
168 |
|
---|
169 | % Real work done
|
---|
170 |
|
---|
171 | \lhead{\emph{GNU Debugger Extensions for \uC}} % Set the left side page header to "Abbreviations"
|
---|
172 | \input{Chapters/Extensions}
|
---|
173 | \clearpage %Start a new page
|
---|
174 | \lhead{\emph{\CFA Demangler}} % Set the left side page header to "Abbreviations"
|
---|
175 | \input{Chapters/Demangler}
|
---|
176 | \clearpage %Start a new page
|
---|
177 |
|
---|
178 | \lhead{\emph{Conclusion}} % Set the left side page header to "Abbreviations"
|
---|
179 | \input{Chapters/Conclusion} % Conclusion
|
---|
180 |
|
---|
181 | %% ----------------------------------------------------------------
|
---|
182 | % Now begin the Appendices, including them as separate files
|
---|
183 |
|
---|
184 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
|
---|
185 |
|
---|
186 | \appendix % Cue to tell LaTeX that the following 'chapters' are Appendices
|
---|
187 |
|
---|
188 | %\input{Appendices/AppendixA} % Appendix Title
|
---|
189 |
|
---|
190 | %\input{Appendices/AppendixB} % Appendix Title
|
---|
191 |
|
---|
192 | %\input{Appendices/AppendixC} % Appendix Title
|
---|
193 |
|
---|
194 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
|
---|
195 | \backmatter
|
---|
196 |
|
---|
197 | %% ----------------------------------------------------------------
|
---|
198 | \label{Bibliography}
|
---|
199 | \lhead{\emph{Bibliography}} % Change the left side page header to "Bibliography"
|
---|
200 | \bibliographystyle{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography
|
---|
201 | \bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"
|
---|
202 |
|
---|
203 | \end{document} % The End
|
---|
204 | %% ----------------------------------------------------------------
|
---|