From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Justin Randall" Newsgroups: gmane.emacs.bugs Subject: emacs gud does not work with libtool Date: Tue, 26 Aug 2003 11:38:24 -0500 (CDT) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <48052.64.37.133.101.1061915904.squirrel@ox.jrlogic.dyndns.org> Reply-To: logic@jrlogic.dyndns.org NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1061917134 22336 80.91.224.253 (26 Aug 2003 16:58:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2003 16:58:54 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 26 18:58:52 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19rh9g-00079B-00 for ; Tue, 26 Aug 2003 18:58:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rh9P-0007uz-NN for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Aug 2003 12:58:35 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19rgui-0001Dm-3B for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2003 12:43:24 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19rgsh-00071A-V3 for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2003 12:41:51 -0400 Original-Received: from [66.143.162.142] (helo=jrlogic.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rgs3-0006HN-ID for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2003 12:40:39 -0400 Original-Received: (qmail 13564 invoked from network); 26 Aug 2003 16:38:24 -0000 Original-Received: from unknown (HELO jrlogic.dyndns.org) (127.0.0.1) by localhost with SMTP; 26 Aug 2003 16:38:24 -0000 Original-Received: from 64.37.133.101 (SquirrelMail authenticated user logic) by ox.jrlogic.dyndns.org with HTTP; Tue, 26 Aug 2003 11:38:24 -0500 (CDT) Original-To: bug-gnu-emacs@gnu.org User-Agent: SquirrelMail/1.4.1 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5646 The gud.el included with emacs 21.3 prepends arguments to gdb M-x gdb Run gdb as: gdb which appearantly is executed as gdb -cd -fullname When fronting gdb with libtool to debug not-yet-installed programs M-x gdb Run gdb as: libtool gdb it's executed as libtool -cd -fullname gdb 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 executs as: gdb -cd -fullname and M-x gdb Run gdb as: libtool gdb executs as libtool gdb -cd -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.