Make it possible to ignore page faults in GDB.
[pintos-anon] / doc / debug.texi
index 62d951add313c9a3f8ba48c304ff5b773594561f..0d5a79deaf6917be4c46e750a1993ef778b29170 100644 (file)
@@ -360,6 +360,8 @@ that links the elements.
 Example: @code{dumplist all_list thread all_elem} prints all elements of
 @struct{thread} that are linked in @code{struct list all_list} using the
 @code{struct list_elem all_elem} which is part of @struct{thread}.
+(This assumes that you have added @code{all_list} and @code{all_elem}
+yourself.)
 @end deffn
 
 @deffn {GDB Macro} btthread thread
@@ -380,6 +382,8 @@ Example: @code{btthreadlist all_list all_elem} shows the backtraces of
 all threads contained in @code{struct list all_list}, linked together by
 @code{all_elem}.  This command is useful to determine where your threads
 are stuck when a deadlock occurs.  Please see the example scenario below.
+(This assumes that you have added @code{all_list} and @code{all_elem}
+yourself.)
 @end deffn
 
 @deffn {GDB Macro} btpagefault
@@ -440,6 +444,10 @@ in your kernel, because your kernel should never crash.  Starting with
 Project 3, the situation will change if you use @func{get_user} and
 @func{put_user} strategy to verify user memory accesses
 (@pxref{Accessing User Memory}).
+
+If you don't want GDB to stop for page faults, then issue the command
+@code{handle SIGSEGV nostop}.  GDB will still print a message for
+every page fault, but it will not come back to a command prompt.
 @end deffn
 
 @node Example GDB Session