Debugging Flashcards

1
Q

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

1) Debug the CPU as well as internal peripherals

2) Simulate code running in a virtual sandbox

3) Examine the contents of memory and program FLASH

4) Allow single-stepping, breakpoints and watchpoints

A

1) Debug the CPU as well as internal peripherals

3) Examine the contents of memory and program FLASH

4) Allow single-stepping, breakpoints and watchpoints

With JTAG, can peek inside a device, check if it’s doing things correctly, and even fix problems without taking it apart. It’s a handy tool for making sure electronic gadgets work properly and finding and fixing any issues they might have.

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

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

stabilization
optimization
intrusiveness
performance

A

stabilization (involves making sure the system doesn’t crash or behave unpredictably during the debugging process)
intrusiveness

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

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

The test should contain all possible input values

The UUE internal behaviour needs to be examined

The UUE internal behaviour is not a concern

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

A

The UUE internal behaviour is not a concern

In black box testing, the focus is on testing the UUT’s functionality from an external perspective without needing to know its internal details. Test cases are designed based on the UUT’s specifications, requirements, and expected inputs and outputs. The tester does not examine or have knowledge of the UUT’s internal implementation or behavior.

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

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

Memory and I/O ports are accessible while running

Ability to observe software execution in real time

Communicates with the debugging computer

Breakpoint by replacing an instruction in memory with a trap

A

Breakpoint by replacing an instruction in memory with a trap

Software breakpoints or instruction replacement are more commonly associated with software-based debugging or simulation environments, whereas hardware-based debuggers use mechanisms like the JTAG interface to halt the processor’s execution at specific points in the code for observation and inspection.

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

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

1) Only correct input values

2) Actual behaviour

3) Wanted output

4) Expected behaviour

A

3)Wanted output

4) Expected behaviour

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

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

You can’t find all defects, no matter what

Careful testing is needed to remove all errors

Good programmers don’t write code with errors

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
7
Q

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

Print statements

Desk-checking

Hardware Breakpoints

LED monitoring

A

1 Desk-checking (review the code and logic on paper or on a computer screen without modifying the actual code)
2 Hardware Breakpoints (involve setting breakpoints in the processor’s control registers, is typically more controlled and can be limited to specific addresses or conditions, minimizing the disruption to the overall system.)
3 LED monitoring (need to introduce additional hardware)
4 Print statements

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

Boundary scan testing inside a microcontroller:

Is a parallel, asynchronous test bus for the internal CPU

Can intercept signals between CPU and external pins

Controls the CPU alone

Only controls the state of the 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
8
Q

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

LED monitoring

software breakpoints

hardware breakpoints

print statement

A

hardware breakpoints

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