From: Carlos Eduardo Rodrigues de Almeida <eduardo.almeida@gmail.com>
To: Carlos Eduardo Rodrigues de Almeida <eduardo.almeida@gmail.com>,
gdb@sources.redhat.com
Subject: Re: Sending signal to inferior
Date: Fri, 30 Dec 2005 04:29:00 -0000 [thread overview]
Message-ID: <214135380512292029i36e2e5cft8f9715b1bfa2b4a5@mail.gmail.com> (raw)
In-Reply-To: <20051230041134.GB1316@white>
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 conditions.
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
\x19GNU 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 conditions.
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) \x19file /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 <bob@brasko.net> 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 you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> 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/src/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 you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> 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
>
next prev parent reply other threads:[~2005-12-30 4:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 3:37 Carlos Eduardo Rodrigues de Almeida
2005-12-30 4:11 ` Bob Rossi
2005-12-30 4:29 ` Carlos Eduardo Rodrigues de Almeida [this message]
2005-12-30 4:42 ` Bob Rossi
2005-12-30 4:57 ` Carlos Eduardo Rodrigues de Almeida
2005-12-30 16:43 ` Bob Rossi
2005-12-30 16:48 ` Daniel Jacobowitz
2005-12-30 17:04 ` Bob Rossi
2005-12-30 22:58 ` Bob Rossi
2005-12-30 23:14 ` Bob Rossi
2006-01-03 13:11 Sanborn, Ed
2006-01-03 22:54 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=214135380512292029i36e2e5cft8f9715b1bfa2b4a5@mail.gmail.com \
--to=eduardo.almeida@gmail.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox