From owner-cvs-all@FreeBSD.ORG Sat Jul 5 03:48:04 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F8AB1065672; Sat, 5 Jul 2008 03:48:04 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id A0BB28FC15; Sat, 5 Jul 2008 03:48:03 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl135-103.kln.forthnet.gr [77.49.254.103]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-4) with ESMTP id m653lXwt031491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 5 Jul 2008 06:47:39 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m653lXFL092381; Sat, 5 Jul 2008 06:47:33 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m653lWnB092368; Sat, 5 Jul 2008 06:47:32 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Gabor Pali References: <200807050224.m652OWW9021964@repoman.freebsd.org> Date: Sat, 05 Jul 2008 06:47:32 +0300 In-Reply-To: <200807050224.m652OWW9021964@repoman.freebsd.org> (Gabor Pali's message of "Sat, 5 Jul 2008 02:24:32 +0000 (UTC)") Message-ID: <878wwhvvor.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m653lXwt031491 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.246, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.15, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2008 03:48:04 -0000 On Sat, 5 Jul 2008 02:24:32 +0000 (UTC), Gabor Pali 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 @@ - Your best bet here is to rebuild &man.ppp.8; by adding - CFLAGS+=-g and - STRIP= to the end of the /etc/make.conf, then - doing a make install - clean in /usr/src/usr.sbin/ppp. When &man.ppp.8; hangs, find the - &man.ppp.8; process ID with pgrep - ppp and run gdb ppp - PID (as gdb ppp `pgrep ppp`). From the gdb - prompt, you can then use bt to get a - stack trace. - - Send the results to &a.brian;. + 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 ppp process that is stuck. To + rebuild the ppp utility with debugging + information, you can type: + + &prompt.root; cd /usr/src/usr.sbin/ppp +&prompt.root; env DEBUG_FLAGS='-g' make clean +&prompt.root; env DEBUG_FLAGS='-g' make install + +

Then you should restart ppp and wait + until it hangs again. When the debug build + of ppp hangs, + start gdb on the stuck process by + typing:

+ + &prompt.root; gdb ppp `pgrep ppp` + +

At the gdb prompt, you can use + the bt or where commands to + get a stack trace. Save the output of + your gdb session, + and detach from the running process by + the quit command + of gdb.

+ +

Finally, send the log of your gdb + session to &a.brian;. %%%