From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12222 invoked by alias); 15 May 2006 21:31:57 -0000 Received: (qmail 12212 invoked by uid 22791); 15 May 2006 21:31:56 -0000 X-Spam-Check-By: sourceware.org Received: from nwkea-pix-1.sun.com (HELO nwkea-pix-1.sun.com) (192.18.42.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 21:31:14 +0000 Received: from d1-sfbay-05.sun.com ([192.18.39.115]) by nwkea-pix-1.sun.com (8.12.10+Sun/8.12.9) with ESMTP id k4FLVCpK012429 for ; Mon, 15 May 2006 14:31:12 -0700 (PDT) Received: from conversion-daemon.d1-sfbay-05.sun.com by d1-sfbay-05.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0IZB00301SPA7C00@d1-sfbay-05.sun.com> (original mail from Nikolay.Molchanov@Sun.COM) for gdb@sourceware.org; Mon, 15 May 2006 14:31:12 -0700 (PDT) Received: from Sun.COM ([129.146.186.185]) by d1-sfbay-05.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IZB00GABT403620@d1-sfbay-05.sun.com> for gdb@sourceware.org; Mon, 15 May 2006 14:31:12 -0700 (PDT) Date: Mon, 15 May 2006 21:51:00 -0000 From: Nikolay Molchanov Subject: Can I use -exec-interrupt to stop the inferior program? To: gdb@sourceware.org Message-id: <4468F31E.8090805@Sun.COM> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00227.txt.bz2 Hello! I'm looking for a solution how to stop the inferior program, which is running under gdb. I can stop it using ^C, but I need a solution, that will work for the following case: Java application | ^ stdin | | stdout v | GDB debugger (gdb --i mi --tty /dev/pts/2 ...) | ^ v | Inferior program <--> External terminal (/dev/pts/28) The action to stop the program is initiated by Java application, which cannot send ^C to the external terminal. So I have to use stdin to tell gdb to stop the inferior program. But gdb does not read the "-exec-interrupt" command, until the program is stopped sside-linux nikm/t1-exec-interrupt> gdb --i mi --tty /dev/pts/2 t2pl ~"GNU gdb 6.1\n" ~"Copyright 2004 Free Software Foundation, Inc.\n" ~"GDB is free software, covered by the GNU General Public License, and you are\n" ~"welcome to change it and/or distribute copies of it under certain conditions.\n" ~"Type \"show copying\" to see the conditions.\n" ~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n" ~"This GDB was configured as \"x86_64-suse-linux\"..." ~"Using host libthread_db library \"/lib64/tls/libthread_db.so.1\".\n" ~"\n" (gdb) run &"run\n" -exec-interrupt ^done,reason="exited",exit-code="0100" (gdb) ^error,msg="mi_cmd_exec_interrupt: Inferior not executing." (gdb) Perhaps "-exec-interrupt" does not work in gdb 6.1? If that's correct, can you tell me which version supports "-exec-interrupt"? Thanks in advance, Nikolay Molchanov