Debugging Flashcards
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
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.
Which aspect is the MOST important when performing debugging? (Select 2)
stabilization
optimization
intrusiveness
performance
stabilization (involves making sure the system doesn’t crash or behave unpredictably during the debugging process)
intrusiveness
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
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.
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
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.
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
3)Wanted output
4) Expected behaviour
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
You can’t find all defects, no matter what
Sort the following technique from the least intrusive (#1) to the most intrusive (#4).
Print statements
Desk-checking
Hardware Breakpoints
LED monitoring
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
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
Can intercept signals between CPU and external pins
Which debugging technique would be the most appropriate for an ISR (interrupt sub routine)?
LED monitoring
software breakpoints
hardware breakpoints
print statement
hardware breakpoints