Machine-translated by Google. Questions are authored in English.
Top

Discussion

Debugging by inserting print statements is unsuitable for a timing-critical fault because

  • A.the compiler removes them altogether at the higher optimisation levels
  • B.the printing itself changes the timing being investigated
  • C.print statements cannot be used in embedded code at all
  • D.the output cannot be captured without a debugger

Answer: B

Several hundred microseconds spent formatting and transmitting a line displaces the very event under study, and the fault often disappears. Toggling a spare pin and watching it on an analyser costs a few cycles and disturbs nothing.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.