File tree 3 files changed +83
-0
lines changed
05_compilation_and_debugging/slides 3 files changed +83
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ all : compilation_and_debugging.pdf
3
+
4
+ % .pdf : % .tex
5
+ latexmk -pdf -pdflatex=" xelatex --shell-escape" -use-make $<
6
+
7
+ clean :
8
+ latexmk -CA
9
+
Original file line number Diff line number Diff line change
1
+ \input {../../_common/preamble }
2
+
3
+ \title {Compilation and debugging}
4
+
5
+ \begin {document }
6
+
7
+ \maketitle
8
+
9
+ \section {Compilation }
10
+
11
+ \begin {frame }{Compilation steps}
12
+ \begin {enumerate }
13
+ \item Preprocessing
14
+ \item Compilation
15
+ \item Linking
16
+ \end {enumerate }
17
+ \end {frame }
18
+
19
+ \begin {frame }[fragile]{Preprocessing}
20
+ \begin {itemize }
21
+ \item Transforms lines starting with \mintinline {cpp}{#}
22
+ \item Mostly used to \mintinline {cpp}{#include} files
23
+ \item Another common usage are \mintinline {cpp}{#include} guards
24
+ \item Can also be used to \mintinline {cpp}{#define} macros
25
+ \end {itemize }
26
+ \end {frame }
27
+
28
+ \begin {frame }{Compilation}
29
+ \begin {itemize }
30
+ \item Transforms code to machine code
31
+ \item Itself composed of multiple steps:
32
+ \begin {enumerate }
33
+ \item Parsing and type checking
34
+ \item Non\hyp {}specific optimisation
35
+ (e.g.\ dead code elimination)
36
+ \item CPU\hyp {}specific optimisation
37
+ (e.g.\ instruction scheduling)
38
+ \end {enumerate }
39
+ \end {itemize }
40
+ \end {frame }
41
+
42
+ \begin {frame }{Linking}
43
+ \begin {itemize }
44
+ \item Combines multiple files into a final executable
45
+ \item Organises a program's address space (e.g.\ through relocation)
46
+ \item Two main strategies:
47
+ \begin {description }
48
+ \item [Dynamic] (Some) libraries are loaded at runtime
49
+ \item [Static] All libraries are included
50
+ \end {description }
51
+ \end {itemize }
52
+ \end {frame }
53
+
54
+ \section {Debugging }
55
+
56
+ \begin {frame }
57
+ \vfill
58
+ \begin {center }
59
+ {\Large %
60
+ Let's use a debugger!}
61
+ \end {center }
62
+ \vfill
63
+ \end {frame }
64
+
65
+ \begin {frame }{Other options}
<
6537
/tr>
66
+ \begin {itemize }
67
+ \item Assertions
68
+ \item Logging
69
+ \item Unit tests
70
+ \end {itemize }
71
+ \end {frame }
72
+
73
+ \end {document }
74
+
You can’t perform that action at this time.
0 commit comments