emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: emacs gud does not work with libtool


From: Justin Randall
Subject: Re: emacs gud does not work with libtool
Date: Tue, 14 Oct 2003 20:55:22 -0500
User-agent: KMail/1.5.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 14 October 2003 04:53 pm, Stefan Monnier wrote:
> > Emacs in CVS doesn't inject -cd <directory> after the first argument.
> > Here's a patch (for Emacs in CVS so I've cc'd it to
> > address@hidden) Does it do the right thing?
> >
> > Nick
> >
> > *** gud.el.~1.10.~  2003-09-30 18:53:05.000000000 +0100
> > --- gud.el  2003-10-11 23:40:42.000000000 +0100
> > ***************
> > *** 2337,2342 ****
> > --- 2337,2344 ----
> >      ;; and put t in its place.
> >      ;; Later on we will put the modified file name arg back there.
> >      (file-word (let ((w (cdr words)))
> > +                 (unless (= ?- (aref (car w) 0))
> > +                   (setq w (cdr w)))
> >                   (while (and w (= ?- (aref (car w) 0)))
> >                     (setq w (cdr w)))
> >                   (and w
>
> The patch looks odd and unrelated to your explanation.
> And the email given as context doesn't help me understand
> what is the problem and how we are trying to solve it.
>
> Could you explain a bit more, showing what is the wrong behavior
> we're trying to fix and with what we are trying to replace it ?
>
>
>         Stefan

The problem, illustrated, was covered earlier in this thread. In summary:
If I am building a project using the GNU auto tools (automake, autoconf and 
libtool) it produces a script that will work with libraries that are in my 
compile directories, but not yet installed. I must invoke gdb as:
libtool gdb <exec target>

emacs injects parameters to the command line I provide so that it reads 
something like
libtool -cd <working dir> gdb <exec target>

which, when invoked in the context of libtool, makes no sense and gdb fails to 
start. However, if it is invoked as
libtool gdb <exec target> -cd <working dir>
gdb is happy and I can debug my uninstalled executable (wrapped by the libtool 
generated script). I've wrapped the libtoo/gdb invocation in a script (per a 
suggestion posted immediatly in response to my question) and that is an 
acceptable workaround for me.

Ideally, I would like to just feed the exec target to emacs and have it do the 
right thing. In practice, it would be nice if I *have* to prefix gdb with 
libtool, if emacs would append it's arguments to my command line rather than 
insert them before the second argument on the command line.

I offered a patch a while ago when I ran into this problem, but someone said it 
was already fixed in CVS, so I'll just wait until it's released and gentoo 
packages are ready. I can live with the workaround until then.

Thanks to everyone on the mailing list who have been so responsive and helpful!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/jKkKVNfzd40u7PwRAhS8AJ99EEjThIwVbQIztujAblCU49wn2QCbBU7L
yDIw5eE3HskhNuLI+zmCaAs=
=uFpI
-----END PGP SIGNATURE-----





reply via email to

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