From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.help Subject: Re: kgdb in emacs Date: Sun, 27 Jan 2008 22:23:51 +1300 Message-ID: <18332.19879.672102.308829@kahikatea.snap.net.nz> References: <18332.16451.636317.296261@kahikatea.snap.net.nz> <177972.91003.qm@web57709.mail.re3.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201427751 1782 80.91.229.12 (27 Jan 2008 09:55:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jan 2008 09:55:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Sanjeev Kumar.S" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 10:56:10 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJ4F8-0002g1-KT for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 10:56:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ4Ei-0006q3-40 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 04:55:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJ4EP-0006pd-Ox for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 04:55:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJ4EN-0006pP-06 for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 04:55:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ4EM-0006pM-Sj for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 04:55:14 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJ4EM-0004gi-4x for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 04:55:14 -0500 Original-Received: from kahikatea.snap.net.nz (162.63.255.123.dynamic.snap.net.nz [123.255.63.162]) by viper.snap.net.nz (Postfix) with ESMTP id A802A3DA252; Sun, 27 Jan 2008 22:23:56 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id A942D8FC6D; Sun, 27 Jan 2008 22:23:52 +1300 (NZDT) In-Reply-To: <177972.91003.qm@web57709.mail.re3.yahoo.com> X-Mailer: VM 7.19 under Emacs 23.0.60.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51005 Archived-At: > Thank you very much Nick, Your clue of emacs version prompted me > to upgrade my emacs. after which I'm able to do it. I guess you mean Emacs now parses your command line now. But presumably you still get *gud-cuad0* in the mode-line of the GUD buffer. > BTW, my earlier emacs version was 21.2.4 and now it is 22.0.50.1 > > One more question: I'm still not able to open the file another emacs > window. I thought this was supposed happen automatically. In other > instances of emacs ( like when debugging apps ) the source code file > opens automatically in another emacs window ( vertical split style). I have some more thoughts but you need to answer my questions for good communication. Does kgdb work like gdb? Is "target remote /dev/cuad0" a valid kgdb command? > Even if it doesn't, when I enter "f" it opens up automatically. For the source to appear gdb/kgdb must output annotations. In gdb, this requires "--fullname" or "-annotate=1" for text mode and "-annotate=3" for graphical mode. In Emacs 21 "--fullname" was used but was not visible to the user. In Emacs 22, running an app like this: Run gdb (like this): gdb myprog won't display the source, but: Run gdb (like this): gdb -annotate=3 myprog will. Likewise, I suspect Run gdb ( like this ) : kgdb -r /dev/cuad0 kernel.debug won't display the source, but: Run gdb ( like this ) : kgdb -a -a -a -r /dev/cuad0 kernel.debug will. > One possibility is, though i changed the emacs current directory > to /usr/obj/usr/src/sys/MYKERNEL/ , the -r /dev/cuad0 option would have > changed the default directory, as evident in the file line when a gud > window is opened: > Current directory is /dev/ > :( You really want to find another way of specifying the arguments along the lines that I suggested, so that the directory doesn't change and you get *gud-kernel.debug* in the mode-line of the GUD buffer. However, I think another way to stop the current directory from changing is to set gud-chdir-before-run to nil. One last thing, if you do get it to work well, please e-mail me what you have learnt so that I can add it to my homepage. Thanks, Nick http://www.inet.net.nz/~nickrob