X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fdebug.texi;fp=doc%2Fdebug.texi;h=8fbc7d53bd6b7bdcb16950754de7c47bd8fd70b5;hb=021e47db7a7a0527bc7d0a9eefb25d4f36caace0;hp=6432ca3a1fa530a9a13af7710a4d4f8d3f535ef1;hpb=5b661956ace4b384f64670c065d283bc7ef7ca4e;p=pintos-anon diff --git a/doc/debug.texi b/doc/debug.texi index 6432ca3..8fbc7d5 100644 --- a/doc/debug.texi +++ b/doc/debug.texi @@ -119,9 +119,15 @@ Alternatively, it could be that the @file{kernel.o} you passed to the backtrace. Sometimes backtraces can be confusing without implying corruption. -Compiler optimizations can cause surprising behavior. For example, when -a function has called another function as its final action (a @dfn{tail -call}), the calling function may not appear in a backtrace at all. +Compiler optimizations can cause surprising behavior. When a function +has called another function as its final action (a @dfn{tail call}), the +calling function may not appear in a backtrace at all. Similarly, when +function A calls another function B that never returns, the compiler may +optimize such that an unrelated function C appears in the backtrace +instead of A. Function C is simply the function that happens to be in +memory just after A. In the threads project, this is commonly seen in +backtraces for test failures; see @ref{The pass function fails, , +@func{pass} Fails}), for more information. @menu * Backtrace Example::