Lecture 8: Debugging Flashcards

(14 cards)

1
Q

Welcher Compiler-Schalter schreibt Debug-Symbole in die Binärdatei?

A

-g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Welcher Schalter schaltet Optimierungen ab, damit Maschinencode dem Quellcode ähnlicher bleibt?

A

-O0 (oder das mildere -Og)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Befehl, um das Programm innerhalb von gdb zu starten?

A

run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Breakpoint per Zeilennummer/Funktionsname setzen?

A

b bzw. `break <ZlNr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Variable während des Stops inspizieren?

A

p bzw. print <var></var>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Speicher an Adresse inspizieren (Hex-Dump etc.)?

A

x <addr> und Varianten wie x/16x</addr>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Einzelschritt in Funktionen hinein?

A

s / step

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Einzelschritt über Funktionsaufrufe hinweg?

A

n / next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Bis zum nächsten Breakpoint weiterlaufen lassen?

A

c / continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Aktuelle Funktion fertig ausführen und zurückkehren?

A

finish

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Alle Breakpoints auflisten?

A

info break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Breakpoint entfernen?

A

delete <Nr></Nr>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Breakpoint temporär deaktivieren/aktivieren?

A

disable <Nr> / enable <Nr></Nr></Nr>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Warum sollte man -g und -O0 gemeinsam nutzen?

A

Ohne Optimierung bleiben Variablen/Zeilen weitgehend erhalten, was das Debugging präziser macht.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly