From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sanjeev Kumar.S" Newsgroups: gmane.emacs.help Subject: Re: kgdb in emacs Date: Sun, 27 Jan 2008 03:21:36 -0800 (PST) Message-ID: <599749.86642.qm@web57714.mail.re3.yahoo.com> References: <18332.25118.870355.870079@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1039272229==" X-Trace: ger.gmane.org 1201432927 14477 80.91.229.12 (27 Jan 2008 11:22:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jan 2008 11:22:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nick Roberts Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 12:22:26 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 1JJ5aj-0004Ih-3m for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 12:22:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ5aI-0007y7-DZ for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 06:21:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJ5Zy-0007xm-PJ for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 06:21:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJ5Zx-0007xa-Bp for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 06:21:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ5Zx-0007xX-9c for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 06:21:37 -0500 Original-Received: from web57714.mail.re3.yahoo.com ([68.142.236.77]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JJ5Zx-0003ec-7w for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 06:21:37 -0500 Original-Received: (qmail 89467 invoked by uid 60001); 27 Jan 2008 11:21:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=a+YYTDldmvBqPziR6l4LRWvNM/ejS5rlYkG6zBdR0PMKOncs3GSQ1oL+qzKHcAUw10E3vLJQoDaSzLnLczLPOjmfoTnJMTjBzGIdx8KmFH+v1puhx8BqYl3IPWUSOwDEA5P44aHv21+s6ErRlTMIPRyyhoLTYWPGvd5ILDsLabM=; X-YMail-OSG: fYT70WgVM1kVddfHJXH9Lf8RAZkN1EfZMP0gCZKWbXlxIdY5iEXgc6YKx8uKt8xTpenUVDRwiUBLtqoPMBi4rjTeM2cax6mVbp6WUNo47CnaX7_PnvU- Original-Received: from [210.68.188.20] by web57714.mail.re3.yahoo.com via HTTP; Sun, 27 Jan 2008 03:21:36 PST In-Reply-To: <18332.25118.870355.870079@kahikatea.snap.net.nz> X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:51008 Archived-At: --===============1039272229== Content-Type: multipart/alternative; boundary="0-826901373-1201432896=:86642" Content-Transfer-Encoding: 8bit --0-826901373-1201432896=:86642 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To see what kgdb is doing run kgdb -a -r /dev/cuad0 kernel.debug and perhaps kgdb -a -a -a -r /dev/cuad0 kernel.debug from the command line. With GDB, Emacs uses the marker ^Z^Z to parse the file and line number: (gdb) b main Breakpoint 1 at 0x804862c: file myprog.c, line 95. (gdb) r Starting program: /home/nickrob/myprog Breakpoint 1, main (argc=1, argv=0xbfcfbfd4) at myprog.c:95 ^Z^Z/home/nickrob/myprog.c:95:1274:beg:0x804862c (gdb) kgdb should output something similar. However, I guess the kernel in your case is already running, so maybe it's a bit like attaching to a process and perhaps the first marker is missing. Sanjeev: I'm using emacs graphical. I see now what you meant by gdb-many-windows (locals and breakpoints and stackframes). and I dont think its got anything to do with source code display, eg in my case even after the new break enters the old source code is displayed in the multi-window mode. and when I do a "n" the current source where the break hit was displayed. and like in other emacs instances after the "n" when I do a "f" I get the source opened in a seperate window if it is not already opened. But I think like you said the marker ^Z^Z is missing, I dont want to step everytime I jump into gdb to see where I am in the code. Any way to get this working ? I tried doing a ^Z^Z on the emacs window and it minimized on the first ^Z :). Doesnt want me to use it anymore. Regards, Sanjeev. --------------------------------- Never miss a thing. Make Yahoo your homepage. --0-826901373-1201432896=:86642 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To see what kgdb is doing run

kgdb -a -r /dev/cuad0 kernel.debug

and perhaps

kgdb -a -a -a -r /dev/cuad0 kernel.debug

from the command line.

With GDB, Emacs uses the marker ^Z^Z to parse the file and line number:

(gdb) b main
Breakpoint 1 at 0x804862c: file myprog.c, line 95.
(gdb) r
Starting program: /home/nickrob/myprog

Breakpoint 1, main (argc=1, argv=0xbfcfbfd4) at myprog.c:95
^Z^Z/home/nickrob/myprog.c:95:1274:beg:0x804862c
(gdb)

kgdb should output something similar. However, I guess the kernel in your
case is already running, so maybe it's a bit like attaching to a process
and perhaps the f irst marker is missing.

Sanjeev: I'm using emacs graphical. I see
now what you meant by gdb-many-windows
(locals and breakpoints and stackframes).
and I dont think its got anything to do with
source code display, eg in my case even
after the new break enters the old source code is displayed in the multi-window mode.
and when I do a "n" the current source where the break
hit was displayed. and like in other emacs instances
after the "n" when I do a "f" I get the source
opened in a seperate window if it is not already
opened.
But I think like you said the marker ^Z^Z is
missing, I dont want to step everytime I
jump into gdb to see where I am in the code.
Any way to get this working ? I tried doing a
^Z^Z on the emacs window and it minimized  on the first ^Z :). Doesnt want
me to use it anymore.
Regards,
Sanjeev.


Never miss a thing. Make Yahoo your homepage. --0-826901373-1201432896=:86642-- --===============1039272229== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1039272229==--