X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=doc%2Fdebug.texi;h=bd1aa6af1c601a3e805573550e08a37e21df0b32;hb=bfd2e965e1aa5f2b00dff6b11be770c6cbe7313d;hp=ce3e4bd0a35fb6ff38d70374c3cabfde1bab814e;hpb=1c07a79a63dbbd1f4047bf32046518de6f879d50;p=pintos-anon diff --git a/doc/debug.texi b/doc/debug.texi index ce3e4bd..bd1aa6a 100644 --- a/doc/debug.texi +++ b/doc/debug.texi @@ -127,7 +127,7 @@ 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. +@func{pass} Fails}, for more information. @menu * Backtrace Example:: @@ -170,9 +170,9 @@ The backtrace output would then look something like this: 0x8048ac8: ?? (??:0) @end example -(You will probably not get the same results if you run the command above -on your own kernel binary, because the source code you compiled from is -different from the source code that panicked.) +(You will probably not see exactly the same addresses if you run the +command above on your own kernel binary, because the source code you +compiled and the compiler you used are probably different.) The first line in the backtrace refers to @func{debug_panic}, the function that implements kernel panics. Because backtraces commonly @@ -314,7 +314,13 @@ a bug in the original Pintos code. The first and second are quite likely, and you should seriously consider both. We hope that the third is less likely, but it is also possible. -@anchor{Debugging User Programs} +@menu +* Debugging User Programs:: +@end menu + +@node Debugging User Programs +@subsection Debugging User Programs + You can also use @command{gdb} to debug a user program running under Pintos. Start by issuing this @command{gdb} command to load the program's symbol table: