Digital Systems Debugging

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts in debugging, including types of bugs, debugging strategies, and tools like GDB.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

What flexibility does preprocessing offer?

Replacing identifiers with definitions, including header files, controlling compilation, and diagnosing problems.

2
New cards

What is debugging?

A methodical process of finding and reducing the number of bugs, or defects, in a computer program.

3
New cards

What was the first 'bug'?

A moth trapped in a relay of the Harvard Mark II computer in 1947.

4
New cards

What are the two main types of bugs?

Bugs that occur during compilation time (syntax errors, violations of conventions) and bugs that occur during run time (logical errors).

5
New cards

Explain the 'divide and conquer' debugging strategy.

Gradually remove/add code to create the smallest source file that contains the bug. Remove code until the program works well, or add functionality until the program breaks.

6
New cards

What is debugging using logging?

Inserting printf statements in different places of the code to follow its flow.

7
New cards

What are the potential issues with using printf for debugging?

Inclusion of printf could change the behavior of the code (timing, stack), and the code may fail when printf is removed (Heisenbug).

8
New cards

What is a serial/UART interface?

A communication interface between two computers that transmits information sequentially, one bit at a time.

9
New cards

What does a debugger allow you to do?

Stepping through a program, setting breakpoints, investigating machine state, and investigating crashes.

10
New cards

What are some considerations regarding debuggers?

Language-dependent, may require hardware support, and may provide different interfaces (command line or GUI).

11
New cards

What is the GNU Debugger (GDB)?

An open-source debugger developed by the GNU project, designed for the C language, with a command line interface.

12
New cards

What are debug symbols?

Records associating code and variables with source code; generated by the compiler flag –g.

13
New cards

What is Little Endian?

The Least Significant Byte (LSB) is stored first.

14
New cards

What is DAPLink?

An On-Chip Debugger that allows remote debugging, often integrated with VS Code.