This is the mail archive of the gdb@sources.redhat.com 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]

GDB inferior PID ?


Bonjour

	Is there a way to get "reliably" the inferior PID ?

Scenario, Eclipse/CDT debugger:

	I'm using gdb/mi and to separate inferior output from the MI protocol we use 
gdb --tty=...

The downside interrupting the inferior is now messy business
depending on the platfrom.  Totally broken on Solaris, partially
working on GNU/Linux and windows.

I've already drop a PR on the solaris platform.

Solution:

I'm doing some ugly hack/parsing with
(gdb) info program

And retrieving the inferior pid to drop a SIGINT or whatever
it is call on windows(CTRL-BREAK ?).


Anyone having something more elegant/reliable?

Why is the pid(or whatever the host consider to be the "pid") available?
I undestand that it does not apply to remote/serial debugging.

Curious.



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