This is the mail archive of the
mailing list for the GDB project.
Sending signal to inferior program.
- From: logitech <supriya dot rao17 at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 6 Jun 2011 10:32:13 -0700 (PDT)
- Subject: Sending signal to inferior program.
Hi, I am currently working with the gdb source code. I wish to send a signal
to the inferior program at a specific time. I tried forking a thread in
gdb.c which sends signal to the inferior process. To get its pid, I declared
an extern variable shared between gdb.c and linux-nat.c
But this gives a seg fault. Also the signal doesn't seem to get delivered.
fprintf_unfiltered (gdb_stdlog, "linux_nat_wait: [%s]\n",
gpid=ptid.pid; // gpid gets the pid value, the signal is sent to gpid
Moreover when i debug this with flag set, gpid initially gets the value of
pid of inferior, but later it becomes -1.
Is there any other way in which I can accomplish this.
View this message in context: http://old.nabble.com/Sending-signal-to-inferior-program.-tp31785488p31785488.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.