all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs gud does not work with libtool
@ 2003-08-26 16:38 Justin Randall
  0 siblings, 0 replies; 9+ messages in thread
From: Justin Randall @ 2003-08-26 16:38 UTC (permalink / raw)


The gud.el included with emacs 21.3 prepends arguments to gdb
M-x gdb
Run gdb as: gdb <target>
which appearantly is executed as
gdb -cd <path> -fullname <target>

When fronting gdb with libtool to debug not-yet-installed programs
M-x gdb
Run gdb as: libtool gdb <target>
it's executed as
libtool -cd <path> -fullname gdb <target>

Which libtool doesn't like. This could arguably be a shortcoming of
libtool. I've made a change to gud.el to workaround this behavior:

--- gud-original.el     2003-08-26 09:50:28.000000000 -0500
+++ gud.el      2003-08-26 10:47:01.000000000 -0500
@@ -307,8 +307,7 @@
 (defvar gud-gdb-history nil)

 (defun gud-gdb-massage-args (file args)
-  (cons "-cd" (cons (expand-file-name default-directory)
-                   (cons "-fullname" args))))
+  (append args (list "-cd" (expand-file-name default-directory)
"-fullname" )))

 (defvar gud-gdb-marker-regexp
   ;; This used to use path-separator instead of ":";

gud mode will spawn gdb correctly in both cases
M-x gdb
Run gdb as: gdb <target>
executs as:
gdb <target> -cd <path> -fullname

and
M-x gdb
Run gdb as: libtool gdb <target>
executs as
libtool gdb <target> -cd <path> -fullname

Which is the correct behavior for libtool and is appearantly also correct
for gdb. I've tested this with gdb-5.3 and emacs 21.3 debugging programs
and core dumps with no problems.

Thanks to Todd Fiala for helping me grok the el change necessary to get
gdb + libtool working correctly.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:emacs gud does not work with libtool
@ 2003-10-02  1:35 Justin Randall
  2003-10-02 10:19 ` emacs " Andreas Schwab
  2003-10-11 18:25 ` Nick Roberts
  0 siblings, 2 replies; 9+ messages in thread
From: Justin Randall @ 2003-10-02  1:35 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
created programs. Will GNU Emacs ever work with GNU auto-tools created 
programs?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
  2003-10-02  1:35 Re:emacs gud does not work with libtool Justin Randall
@ 2003-10-02 10:19 ` Andreas Schwab
  2003-10-02 14:09   ` Justin Randall
  2003-10-11 18:25 ` Nick Roberts
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2003-10-02 10:19 UTC (permalink / raw)
  Cc: nick, bug-gnu-emacs

Justin Randall <logic@jrlogic.dyndns.org> writes:

> Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
> created programs. Will GNU Emacs ever work with GNU auto-tools created 
> programs?

$ cat ~/bin/lgdb
#!/bin/sh
exec libtool --mode=execute gdb "$@"

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
  2003-10-02 10:19 ` emacs " Andreas Schwab
@ 2003-10-02 14:09   ` Justin Randall
  0 siblings, 0 replies; 9+ messages in thread
From: Justin Randall @ 2003-10-02 14:09 UTC (permalink / raw)
  Cc: nick, bug-gnu-emacs

On Thursday 02 October 2003 05:19 am, Andreas Schwab wrote:
> Justin Randall <logic@jrlogic.dyndns.org> writes:
> > Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool
> > created programs. Will GNU Emacs ever work with GNU auto-tools created
> > programs?
>
> $ cat ~/bin/lgdb
> #!/bin/sh
> exec libtool --mode=execute gdb "$@"
>
> Andreas.

That works. Thank you!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
       [not found] <mailman.968.1065058612.21628.bug-gnu-emacs@gnu.org>
@ 2003-10-02 19:50 ` Simon Josefsson
  2003-10-03 16:21   ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2003-10-02 19:50 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Justin Randall <logic@jrlogic.dyndns.org> writes:

> Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
> created programs. Will GNU Emacs ever work with GNU auto-tools created 
> programs?

Emacs in CVS work fine with gdb and libtool; the problem was that
Emacs modified the prompt that was entered by the user and what was
sent to the shell, which didn't work well.  Now the command is sent
verbatim.  So the next release should handle it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
  2003-10-02 19:50 ` emacs " Simon Josefsson
@ 2003-10-03 16:21   ` Andreas Schwab
  2003-10-03 22:26     ` Simon Josefsson
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2003-10-03 16:21 UTC (permalink / raw)
  Cc: Justin Randall, bug-gnu-emacs

Simon Josefsson <jas@extundo.com> writes:

> Justin Randall <logic@jrlogic.dyndns.org> writes:
>
>> Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
>> created programs. Will GNU Emacs ever work with GNU auto-tools created 
>> programs?
>
> Emacs in CVS work fine with gdb and libtool; the problem was that
> Emacs modified the prompt that was entered by the user and what was
> sent to the shell, which didn't work well.  Now the command is sent
> verbatim.  So the next release should handle it.

There is still the issue with finding the file name argument, which won't
do the right thing if "gdb" is replaced by a multi-word command.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
  2003-10-03 16:21   ` Andreas Schwab
@ 2003-10-03 22:26     ` Simon Josefsson
  2003-10-04 14:43       ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2003-10-03 22:26 UTC (permalink / raw)
  Cc: Justin Randall, bug-gnu-emacs

Andreas Schwab <schwab@suse.de> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> Justin Randall <logic@jrlogic.dyndns.org> writes:
>>
>>> Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
>>> created programs. Will GNU Emacs ever work with GNU auto-tools created 
>>> programs?
>>
>> Emacs in CVS work fine with gdb and libtool; the problem was that
>> Emacs modified the prompt that was entered by the user and what was
>> sent to the shell, which didn't work well.  Now the command is sent
>> verbatim.  So the next release should handle it.
>
> There is still the issue with finding the file name argument, which won't
> do the right thing if "gdb" is replaced by a multi-word command.

I don't understand, can you give an example?  Typing 'libtool gdb
./foo' at the M-x gdb RET prompt work here, if that is what you meant
by multi-word command.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs gud does not work with libtool
  2003-10-03 22:26     ` Simon Josefsson
@ 2003-10-04 14:43       ` Andreas Schwab
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2003-10-04 14:43 UTC (permalink / raw)
  Cc: Justin Randall, bug-gnu-emacs

Simon Josefsson <jas@extundo.com> writes:

> Andreas Schwab <schwab@suse.de> writes:
>
>> Simon Josefsson <jas@extundo.com> writes:
>>
>>> Justin Randall <logic@jrlogic.dyndns.org> writes:
>>>
>>>> Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
>>>> created programs. Will GNU Emacs ever work with GNU auto-tools created 
>>>> programs?
>>>
>>> Emacs in CVS work fine with gdb and libtool; the problem was that
>>> Emacs modified the prompt that was entered by the user and what was
>>> sent to the shell, which didn't work well.  Now the command is sent
>>> verbatim.  So the next release should handle it.
>>
>> There is still the issue with finding the file name argument, which won't
>> do the right thing if "gdb" is replaced by a multi-word command.
>
> I don't understand, can you give an example?  Typing 'libtool gdb
> ./foo' at the M-x gdb RET prompt work here, if that is what you meant
> by multi-word command.

For example, the buffer will be called *gud-gdb* instead of *gud-foo*.
Also, ./foo is supposed to be expanded, and gdb be started with
default-directory set to (file-name-directory "./foo"), but isn't (of
course, the latter does not make a difference in this particular case).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:emacs gud does not work with libtool
  2003-10-02  1:35 Re:emacs gud does not work with libtool Justin Randall
  2003-10-02 10:19 ` emacs " Andreas Schwab
@ 2003-10-11 18:25 ` Nick Roberts
  1 sibling, 0 replies; 9+ messages in thread
From: Nick Roberts @ 2003-10-11 18:25 UTC (permalink / raw)
  Cc: bug-gnu-emacs

 > Emacs 21.3.1 seems to be even more convuluted regarding gdb and libtool 
 > created programs. Will GNU Emacs ever work with GNU auto-tools created 
 > programs?

I've followed some of this thread but I don't work with GNU auto-tools or
libtool, in particular. However, I am quite familiar with gud.el, so perhaps
we can work this one out together.

What is the current behaviour in Emacs?
What would you like to happen?


Nick

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-11 18:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02  1:35 Re:emacs gud does not work with libtool Justin Randall
2003-10-02 10:19 ` emacs " Andreas Schwab
2003-10-02 14:09   ` Justin Randall
2003-10-11 18:25 ` Nick Roberts
     [not found] <mailman.968.1065058612.21628.bug-gnu-emacs@gnu.org>
2003-10-02 19:50 ` emacs " Simon Josefsson
2003-10-03 16:21   ` Andreas Schwab
2003-10-03 22:26     ` Simon Josefsson
2003-10-04 14:43       ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2003-08-26 16:38 Justin Randall

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.