Debugging Flashcards

1
Q

Sort the following technique from the least intrusive (#1) to the most intrusive (#4).

Desk-checking

LED monitoring

Print statements

Hardware Breakpoints

A
  1. Desk Checking
  2. Hardware Breakpoint
  3. LED Monitoring
  4. Print Statements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which techniques are the most appropriate tool for measuring the timing of an interrupt. [choose 2]

GPIO + Oscilloscope

printf Statements

Hardware timer unit

API to call the OS Clock

A

GPIO + Oscilloscope
Hardware timer unit

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

JTAG can support which of the following (select all that apply):

1) Allow single-stepping, breakpoints and watchpoints

2) Examine the contents of memory and program FLASH

3) Simulate code running in a virtual sandbox

4) Debug the CPU as well as internal peripherals

A

Allow single-stepping, breakpoints and watchpoints

Examine the contents of memory and program FLASH

Debug the CPU as well as internal peripherals

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

Which aspect is the MOST important when performing debugging? (Select 2)

intrusiveness

stabilization

optimization

performance

A

Intrusiveness
stabilization

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

For black box testing a unit under test (UUT), which of the following is true?

The UUE internal behaviour needs to be examined

The test should contain all possible input values

Test values should be designed to match the code inside the UUE

The UUE internal behaviour is not a concern

A

The UUE internal behaviour is not a concern

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

Test cases contain a definition of which of the following (select all that apply):

1) Only correct input values

2) Expected behaviour

3) Wanted output

4) Actual behaviour

A

expected bahavior
wanted output

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

Choose the statement that is false for hardware-based debuggers like JTAG.

Ability to observe software execution in real time

Breakpoint by replacing an instruction in memory with a trap

Memory and I/O ports are accessible while running

Communicates with the debugging computer

A

Breakpoint by replacing an instruction in memory with a trap

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

Boundary scan testing inside a microcontroller

Only controls the state of the external pins

Is a parallel, asynchronous test bus for the internal CPU

Controls the CPU alone

Can intercept signals between CPU and external pins

A

Can intercept signals between CPU and external pins

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

Which debugging technique would be the most appropriate for an ISR (interrupt sub routine)?

LED monitoring

hardware breakpoints

software breakpoints

print statement

A

hardware breakpoints

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

Which statement about coding errors is true for a typical software project

Careful testing is needed to remove all errors

Good programmers don’t write code with errors

You can’t find all defects, no matter what

Good software engineering practices mean no errors in code

A

You can’t find all defects, no matter what

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