From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: gdb call with core Date: Fri, 12 May 2006 10:26:02 -0400 Message-ID: <87ac9ntjcj.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147443995 28742 80.91.229.2 (12 May 2006 14:26:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 May 2006 14:26:35 +0000 (UTC) Cc: Klaus Zeitler , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 12 16:26:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FeYb6-0003Gy-DZ for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 16:26:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeYb5-0007Cs-W6 for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 10:26:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeYan-0007AU-L2 for emacs-devel@gnu.org; Fri, 12 May 2006 10:26:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeYal-00079i-LW for emacs-devel@gnu.org; Fri, 12 May 2006 10:26:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeYal-00079b-F0 for emacs-devel@gnu.org; Fri, 12 May 2006 10:26:07 -0400 Original-Received: from [209.226.175.97] (helo=tomts40-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeYcS-0003Vs-Sp; Fri, 12 May 2006 10:27:54 -0400 Original-Received: from alfajor ([70.55.147.184]) by tomts40-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060512142603.JMJT24981.tomts40-srv.bellnexxia.net@alfajor>; Fri, 12 May 2006 10:26:03 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 807FFD853B; Fri, 12 May 2006 10:26:02 -0400 (EDT) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Fri, 12 May 2006 16:36:15 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54339 Archived-At: Eli> What happens if you type "M-x cd RET RET", before Eli> invoking GDB (you may need to switch to a buffer that doesn't visit Eli> any file, before you invoke `cd')? Does it work then? >> >> No, emacs always changes the default dir to the dir where the image resides. Yes, and I've found it to be a pain as well. > I can see why this is reasonable. Why do you think it's bad? He gave one example, there are plenty of others: I often want to run an executable /dir1/foo under GDB (in Emacs) but in the current dir rather than in /dir1, so I have to do M-x gdb ... and then inside GDB I need to change back to where I was. Also I've sometimes used .gdbinit files specific to the place where I run the executable rather than where I compile it. It's pretty easy to do M-x cd before doing M-x gdb (and it's not much more typing since the extra dir you type in M-x cd is saved in the M-x gdb step) if that's what you want, so I'd rather get rid of this annoying `auto-cd' behavior of GUD. Stefan