unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* 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
[parent not found: <mailman.968.1065058612.21628.bug-gnu-emacs@gnu.org>]
* 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

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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).