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

Discussion

Optimisation makes symbol table based debugging harder because

  • A.a variable may have no single storage location during its lifetime
  • B.the optimiser goes about deleting entries from the symbol table
  • C.optimised programs have no symbol table at all
  • D.the debugger cannot read an optimised object file

Answer: A

Correct answer: a variable may have no single storage location during its lifetime

Optimisation moves values between registers and memory, keeps them in different registers at different points, and may eliminate a variable entirely by folding or propagating it. A debugger asking where a variable is may find several answers or none, which is why debugging optimised code is difficult and why compilers emit location lists rather than single addresses.

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

Post your comment

Please log in or register to post a comment.