From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: gdba probs Date: Thu, 12 Dec 2002 08:49:54 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200212121349.gBCDnss08775@rum.cs.yale.edu> References: <15855.47556.171128.631234@nick.uklinux.net> <200212052149.gB5LnZ504967@rum.cs.yale.edu> <15857.24365.637778.876009@nick.uklinux.net> <200212101419.gBAEJnf31571@rum.cs.yale.edu> <15862.30022.647969.267154@nick.uklinux.net> <200212111411.gBBEBUn03805@rum.cs.yale.edu> <15863.48069.658013.465668@nick.uklinux.net> <200212112248.gBBMmR406249@rum.cs.yale.edu> <15863.53945.373935.975803@nick.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039701077 11136 80.91.224.249 (12 Dec 2002 13:51:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 12 Dec 2002 13:51:17 +0000 (UTC) Cc: Stefan Monnier Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18MTja-0002rU-00 for ; Thu, 12 Dec 2002 14:50:38 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18MTv8-0000pe-00 for ; Thu, 12 Dec 2002 15:02:34 +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 18MTjT-0001Jv-01 for emacs-devel@quimby.gnus.org; Thu, 12 Dec 2002 08:50:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18MTiw-0001GW-00 for emacs-devel@gnu.org; Thu, 12 Dec 2002 08:49:58 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18MTiu-0001Cw-00 for emacs-devel@gnu.org; Thu, 12 Dec 2002 08:49:57 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18MTiu-0001Cs-00 for emacs-devel@gnu.org; Thu, 12 Dec 2002 08:49:56 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id gBCDnss08775; Thu, 12 Dec 2002 08:49:54 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Nick Roberts Original-cc: emacs-devel@gnu.org 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:10087 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10087 > > I don't see why we need to change something to the generic part of GUD. > Currently gdb-ui.el requires gud.el. If M-x gdb can be used with "-annotate=2" > then gud.el will require gdb-ui.el. This means they might as well be one > (large) file doesnt it ? Note I said "the generic part of GUD" I didn't say "gud.el". `gud-foo' is part of the generic code, while `gud-gdb-foo' is not. > > > @@ -2344,6 +2347,42 @@ > > > > > > (defun gud-filter (proc string) > > > ;; Here's where the actual buffer insertion is done > > > + (when (and gud-first-time (string-match > > > + "\n\032\032[a-z]" string)) > > > > What if DBX outputs this same sequence? > > You take the patch too literally. It should have something like: > > (string-match "\n\032\032pre-prompt\|\n\032\032breakpoints-invalid" string) And? Same thing: some other debugger might use the exact same sequence. Better put the test in gud-gdb-marker-filter so there's not ambiguity and so the generic part of the code stays cleaner. > > Clearly, we want this hack to be GDB-specific and should thus put it in > > GDB's filter. > > It could go there but you will still end up with only one file. > So it might be better to keep M-x gdba. If, one day, it works properly, > then M-x gdb could go. I think those problems are mostly orthogonal. We may want to move all of gdb-ui.el into gud.el or instead to move all the gud-gdb-foo stuff out of gud.el into gdb-ui.el. But there's no hurry. After all, a few days ago, gud-gdb-complete-filter used to call gdba-complete-filter (or something like that) and that didn't force you to merge things into a single file. The ultimate goal is to merge M-x gdb and M-x gdba, but it doesn't have to be done in a single step. I think the first step is to make sure that both work (maybe with quirks) regardless of whether --annotate=2 was used or not. Miles said: > [Yeah I know gud.el is a big ball of hair already, but there's no sense > in making it worse] Which part are you thinking of ? It's really not that bad. It has annoying limitations due to excessive use of global state (you can't have both a GDB and a PerlDB running at the same time), but the code itself is pretty clean and simple if you ask me (at least the generic part of the code is very slim AFAIK). Stefan