Date: Sat, 05 Jul 2008 06:47:32 +0300 From: Giorgos Keramidas <keramida@freebsd.org> To: Gabor Pali <pgj@freebsd.org> Cc: doc-committers@freebsd.org, cvs-doc@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: doc/en_US.ISO8859-1/books/faq book.sgml Message-ID: <878wwhvvor.fsf@kobe.laptop> In-Reply-To: <200807050224.m652OWW9021964@repoman.freebsd.org> (Gabor Pali's message of "Sat, 5 Jul 2008 02:24:32 %2B0000 (UTC)") References: <200807050224.m652OWW9021964@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 5 Jul 2008 02:24:32 +0000 (UTC), Gabor Pali <pgj@FreeBSD.org> wrote: > pgj 2008-07-05 02:24:32 UTC > > FreeBSD doc repository > > Modified files: > en_US.ISO8859-1/books/faq book.sgml > Log: > Update Question 14.10: > - Rephrase the make(1) command for ppp(8) Hi Gabor, The old command was: make clean && make install which ensures that *all* the sources of ppp(8) are compiled with the new CFLAGS, so that -g can take effect. The new command is: make install clean If there is an already built version of the ppp(8) binary, this will simply install the already existing binary, and then proceed to delete it. The suggestion about STRIP= and CFLAGS+='-g' is a bit old now too. We have support for debug builds in our build (see DEBUG_FLAGS in the make(1) include files `bsd.own.mk', `bsd.prog.mk' and `bsd.lib.mk' at `/usr/share/mk'). So the recommended way of rebuilding ppp(8) with debugging flags should be: cd /usr/src/usr.sbin/ppp env DEBUG_FLAGS='-g' make clean env DEBUG_FLAGS='-g' make install Does the following patch for this question look ok to you? %%% diff -r b0a718fb481d en_US.ISO8859-1/books/faq/book.sgml --- a/en_US.ISO8859-1/books/faq/book.sgml Sat Jul 05 06:32:27 2008 +0300 +++ b/en_US.ISO8859-1/books/faq/book.sgml Sat Jul 05 06:46:04 2008 +0300 @@ -8566,18 +8566,34 @@ </question> <answer> - <para>Your best bet here is to rebuild &man.ppp.8; by adding - <literal>CFLAGS+=-g</literal> and - <literal>STRIP=</literal> to the end of the <filename>/etc/make.conf</filename>, then - doing a <command>make <maketarget>install</maketarget> - <maketarget>clean</maketarget></command> in <filename>/usr/src/usr.sbin/ppp</filename>. When &man.ppp.8; hangs, find the - &man.ppp.8; process ID with <command>pgrep - ppp</command> and run <command>gdb ppp - <replaceable>PID</replaceable></command> (as <command>gdb ppp `pgrep ppp`</command>). From the <command>gdb</command> - prompt, you can then use <command>bt</command> to get a - stack trace.</para> - - <para>Send the results to &a.brian;.</para> + <para>Your best bet here is to rebuild &man.ppp.8; with debugging + information, and then use &man.gdb.1; to grab a stack trace from + the <application>ppp</application> process that is stuck. To + rebuild the <application>ppp</application> utility with debugging + information, you can type:</para> + + <screen>&prompt.root; <userinput>cd /usr/src/usr.sbin/ppp</userinput> +&prompt.root; <userinput>env DEBUG_FLAGS='-g' make clean</userinput> +&prompt.root; <userinput>env DEBUG_FLAGS='-g' make install</userinput></screen> + + <p>Then you should restart <application>ppp</application> and wait + until it hangs again. When the debug build + of <application>ppp</application> hangs, + start <application>gdb</application> on the stuck process by + typing:</p> + + <screen>&prompt.root; <userinput>gdb ppp `pgrep ppp`</userinput></screen> + + <p>At the <application>gdb</application> prompt, you can use + the <command>bt</command> or <command>where</command> commands to + get a stack trace. Save the output of + your <application>gdb</application> session, + and <quote>detach</quote> from the running process by + the <command>quit</command> command + of <application>gdb</application>.</p> + + <p>Finally, send the log of your <application>gdb</application> + session to &a.brian;.</para> </answer> </qandaentry> %%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?878wwhvvor.fsf>