From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1857 invoked by alias); 30 Dec 2005 04:29:24 -0000 Received: (qmail 1848 invoked by uid 22791); 30 Dec 2005 04:29:23 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.199) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Dec 2005 04:29:21 +0000 Received: by zproxy.gmail.com with SMTP id j2so1303800nzf for ; Thu, 29 Dec 2005 20:29:19 -0800 (PST) Received: by 10.65.84.4 with SMTP id m4mr3259273qbl; Thu, 29 Dec 2005 20:29:19 -0800 (PST) Received: by 10.65.222.12 with HTTP; Thu, 29 Dec 2005 20:29:19 -0800 (PST) Message-ID: <214135380512292029i36e2e5cft8f9715b1bfa2b4a5@mail.gmail.com> Date: Fri, 30 Dec 2005 04:29:00 -0000 From: Carlos Eduardo Rodrigues de Almeida To: Carlos Eduardo Rodrigues de Almeida , gdb@sources.redhat.com Subject: Re: Sending signal to inferior In-Reply-To: <20051230041134.GB1316@white> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <214135380512291937q58cd9ebajc40590fdc3936be4@mail.gmail.com> <20051230041134.GB1316@white> X-IsSubscribed: yes 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: 2005-12/txt/msg00214.txt.bz2 The problem is when the inferior is running... I'll try to explain better My program: [eduardo@~/echo]$./echo GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". (gdb) file ../lab3/Debug/lab3 Reading symbols from /home/eduardo/lab3/Debug/lab3...done. Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /home/eduardo/lab3/Debug/lab3 [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 6959)] Now the program is running and displaying a window on another terminal ps -A (partial ps...) 6958 ? 00:00:00 gdb 6959 ? 00:00:01 lab3 6964 pts/1 00:00:00 bash 6968 pts/1 00:00:00 ps kill -2 6958 nothing happens on my program using tgdb_driver: [eduardo@~/Downloads/cgdb-0.5.3/tgdb/tgdb-base/src]$./tgdb_driver =19GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". (tgdb) =19file /home/eduardo/lab3/Debug/lab3 Reading symbols from /home/eduardo/lab3/Debug/lab3...done. Using host libthread_db library "/lib/libthread_db.so.1". (tgdb) run Starting program: /home/eduardo/lab3/Debug/lab3 [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 6950)] on another terminal: ps -A (partial ps..) 6947 pts/1 00:00:00 tgdb_driver 6948 pts/3 00:00:00 tgdb_driver 6949 pts/1 00:00:00 gdb 6950 ? 00:00:01 lab3 6953 pts/2 00:00:00 ps kill -2 6949 and on the tgdb_driver terminal: Program received signal SIGINT, Interrupt. [Switching to Thread 16384 (LWP 6950)] 0x00002aaaabf39084 in poll () from /lib/libc.so.6 (tgdb) I can't make the program receive the sigint, interrupt itself and the control return to GDB Thank you for the answer Eduardo On 12/30/05, Bob Rossi wrote: > > I couldn't find what tgdb does to stop the inferior when I send gdb > > the SIGINT.. does someone can point me a solution? > > Hi Eduardo, > > I don't understand. If I compile and run your program on a sample > inferior, tgdb_driver and your driver act the same. What is the exact > difference you are seeing? > > With your driver: > $ ./driver ./test > GNU gdb 6.3-debian > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and y= ou are > welcome to change it and/or distribute copies of it under certain cond= itions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for det= ails. > This GDB was configured as "i386-linux". > (gdb) No symbol table is loaded. Use the "file" command. > file ./test > Reading symbols from /home/bob/cvs/cgdb/cgdb/builddir/tgdb/tgdb-base/s= rc/tmp/test...done. > Using host libthread_db library "/lib/libthread_db.so.1". > (gdb) (gdb) Quit > > With tgdb_driver: > > $ ./tgdb_driver ./test > GNU gdb 6.3-debian > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and y= ou are > welcome to change it and/or distribute copies of it under certain cond= itions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for det= ails. > This GDB was configured as "i386-linux"...No symbol table is loaded. = Use the "file" command. > Using host libthread_db library "/lib/libthread_db.so.1". > > (tgdb) Quit > (tgdb) > > In both cases, I ran > $ kill -s INT PID > > This is tested on a Debian box, with GDB GNU gdb 6.3-debian. > > Bob Rossi >