This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sending signal to inferior

On Fri, Dec 30, 2005 at 04:57:38AM +0000, Carlos Eduardo Rodrigues de Almeida wrote:
> Thank you.. I'm trying to solve this for days..

Wow, that took me a long time to figure out, and I wrote libtgdb.

It's the tty command that is allowing libtgdb to interrupt GDB when the
inferior is running. Apparently, if you don't move the inferior's
terminal via the GDB tty command, then you can't interrupt the inferior
when it's running.

Basically, I'm assuming that the SIGINT to GDB is ignored if the
inferior has control of the terminal. However, if you put the inferior
on a different terminal, then GDB must handle the SIGINT. This
explanation is just a guess though.

With your program, type 'tty /dev/null' and then run the inferior. You
should now be able to interrupt it via the SIGINT signal to GDB.

> I'll be writing the gui in java, I feel very confortable with it and
> with some libraries it can be very powerfull.

You should look at the eclipse project. They have a fe written in Java.

> I'm trying to create a subprocess and communicate via stin, stdout and
> stderr.. using mi.

Nope. I was hoping you were going to use the MI interface. 

> Do you sugest a better aproach?

I'm currently writing a parser that can parse an MI output command. One of 
the initial ideas I had was to parse GDB/MI, and have the parser output a 
GDB-MI-XML format. That might be useful for you in Java, since it has a 
native XML parser, and then you don't have to worry about the low level 
stuff. The XML output isn't done, but would probably be pretty trivial
to do.

> It is going to be open source!
> If you want to help I can share all my ideas :)

Feel free to send ideas to me, maybe off list. Even though CGDB isn't
far along, there's lot's of area's I went wrong purely through
ignorance, and a lack of features that used to be available in GDB.

Bob Rossi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]