Debugging Flashcards
Sort the following technique from the least intrusive (#1) to the most intrusive (#4).
Desk-checking
LED monitoring
Print statements
Hardware Breakpoints
- Desk Checking
- Hardware Breakpoint
- LED Monitoring
- Print Statements
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
GPIO + Oscilloscope
Hardware timer unit
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
Allow single-stepping, breakpoints and watchpoints
Examine the contents of memory and program FLASH
Debug the CPU as well as internal peripherals
Which aspect is the MOST important when performing debugging? (Select 2)
intrusiveness
stabilization
optimization
performance
Intrusiveness
stabilization
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
The UUE internal behaviour is not a concern
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
expected bahavior
wanted output
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
Breakpoint by replacing an instruction in memory with a trap
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
Can intercept signals between CPU and external pins
Which debugging technique would be the most appropriate for an ISR (interrupt sub routine)?
LED monitoring
hardware breakpoints
software breakpoints
print statement
hardware breakpoints
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
You can’t find all defects, no matter what