From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nickrob@snap.net.nz (Nick Roberts) Newsgroups: gmane.emacs.help Subject: emacs gdb program launcher Date: Thu, 19 Mar 2009 19:05:47 +1300 Message-ID: <18881.57531.608312.634304@snap.net.nz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237442807 25999 80.91.229.12 (19 Mar 2009 06:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2009 06:06:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Vincent Liard Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 07:08:03 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LkBQ1-0004z7-AS for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 07:07:53 +0100 Original-Received: from localhost ([127.0.0.1]:38863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkBOe-0003vL-Rg for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 02:06:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkBOD-0003v4-42 for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 02:06:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkBO8-0003uR-4y for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 02:06:00 -0400 Original-Received: from [199.232.76.173] (port=41968 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkBO8-0003uO-07 for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 02:05:56 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.23]:47047) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkBO7-0007vn-DN for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 02:05:55 -0400 Original-Received: from totara (104.27.255.123.static.snap.net.nz [123.255.27.104]) by viper.snap.net.nz (Postfix) with ESMTP id A711B3DA6C9; Thu, 19 Mar 2009 19:05:48 +1300 (NZDT) Original-Received: by totara (Postfix, from userid 1000) id A7A19C080; Thu, 19 Mar 2009 19:05:47 +1300 (NZDT) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63074 Archived-At: > I'm working on a program that has to be launched from a script which= sets=20 > up the execution environment. Fortunately enough, the script provide= s an=20 > option to start it with GDB and it works ok. >=20 > However, I would like to run this program with GDB from within emacs= , as=20 > can usually be done. Thus, I start GDB with =AB M-x gdb =BB but repl= ace the=20 > command with the program's launcher. >=20 > And it works, but rather than opening the source code with emacs buf= fers,=20 > it merely prints lines to be executed in the *gud* buffer as it woul= d do=20 > with GDB from command line. You don't say what version of Emacs you are using. If it's 22.1, or la= ter, you can see in the minibuffer that gdb runs with the option "--annotate= =3D3". Your script probably interact with Emacs in the same way as gdb would if you removed this option. > I (guess I) undestand GDB is unaware it has been launched from withi= n=20 > emacs but I don't see how to make it interact properly... I've messe= d a=20 > bit with gdb-show-main which was set no NIL but it doesn't seem to c= hange=20 > anything. Could anyone give me a clue ? Assuming your script doesn't filter the gdb output, you probably just n= eed to ensure that it runs gdb with the above option. --=20 Nick http://www.inet.net.nz/~= nickrob