emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdba probs


From: Stefan Monnier
Subject: Re: gdba probs
Date: Wed, 11 Dec 2002 17:48:27 -0500

> 
>  > I feel like it must be possible to have a single filter deal with both 
> cases.
>  > The worst case would be to have a `gud-gdb-undecided-marker-filer' which
>  > would call either one of the two filters or could even replace itself with
>  > the appropriate filter once it has determined which case it's dealing with.
> 
> How about :
> 
> --- gud.el.~1.169.~   Wed Dec 11 18:41:06 2002
> +++ gud.el    Wed Dec 11 22:16:45 2002
> @@ -85,6 +85,8 @@
>    (let ((sym (gud-symbol sym t minor-mode)))
>      (if (boundp sym) (symbol-value sym))))
>  
> +(defvar gud-first-time)

This construction is probably better left for the dynamic-binding
and the defined-elsewhere cases.  Just use

  (defvar gud-first-time nil)

instead.

>  (defvar gud-running nil
>    "Non-nil if debuggee is running.
>  Used to grey out relevant toolbar icons.")
> @@ -453,6 +455,7 @@
>  and source-file directory for your debugger."
>    (interactive (list (gud-query-cmdline 'gdb)))
>  
> +  (setq gud-first-time t)
>    (gud-common-init command-line nil 'gud-gdb-marker-filter)
>    (set (make-local-variable 'gud-minor-mode) 'gdb)

I don't see why we need to change something to the generic part of GUD.

> @@ -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?  Clearly, we want this
hack to be GDB-specific and should thus put it in GDB's filter.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]