From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Toolbar problems with GDB mode. Date: Fri, 10 Jan 2003 17:23:16 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <15899.24801.160084.755641@nick.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v482) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1042216826 26593 80.91.224.249 (10 Jan 2003 16:40:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2003 16:40:26 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18X2Cg-0006uE-00 for ; Fri, 10 Jan 2003 17:40:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18X2Im-0000pG-00 for ; Fri, 10 Jan 2003 17:46:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18X27S-0007cN-00 for emacs-devel@quimby.gnus.org; Fri, 10 Jan 2003 11:34:54 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18X268-00075w-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 11:33:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18X228-0005PG-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 11:29:24 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18X1wu-0003ay-00 for emacs-devel@gnu.org; Fri, 10 Jan 2003 11:24:00 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h0AHJEDU017896; Fri, 10 Jan 2003 18:19:15 +0100 Original-To: Nick Roberts In-Reply-To: <15899.24801.160084.755641@nick.uklinux.net> X-Mailer: Apple Mail (2.482) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10630 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10630 >>> Please don't simply kill the buffer. Always type gdb-quit before starting >>> a new session. I'm writing documentation to say things like that and I >>> will try to make it more robust with time. > >> Could you install a local kill-buffer-hook to handle that for users like >> Jan? > > Yes. I think this works best. I was trying to put it in gud-sentinel which > is > called every time the process state changes. However, this is after the GUD > buffer is killed which makes it difficult to distinguish between gdb and > gdba. > > kill-buffer-hook won't work if the user types quit in the GUD buffer but > this > probably doesn't matter as quit doesn't make much sense here and just > leaves a > dead buffer lying around. Actually it does make sense. To reconnect to an embedded target, it is convinient to quit the debugger and later restart it. If one is debugging something difficult, keeping output from previous sessions in the gdb buffer is helpful. Note, it is usually not a quit followed directly after a restart, but rather quit, edit some files, compile, upload new loadmodule to the target, reboot the target, restart debugger. Can't you both have it in a buffer delete hook and in the sentinel? BTW, starting gdba on my embedded target which doesn't have a main does not load any files. It works just like M-x gdb. Jan D.