stupid question ...

Hi,

I tried to debug Python in interactive mode with gdb, but gdb uses
also
std in/out … so I have no chance to enter commands interactively
for Python.

Does anyone know how to use gdb in such a case??

Thanks

Armin

Previously, Armin Steinhoff wrote in qdn.public.qnxrtp.devtools:

Hi,

I tried to debug Python in interactive mode with gdb, but gdb uses
also
std in/out … so I have no chance to enter commands interactively
for Python.

Does anyone know how to use gdb in such a case??

The simple answer would be to run python in one window, and attach with gdb in the other.

You’ll might want to stick a ‘raise(SIGSTOP);’ at the front of your program to give you time to attach, though.

Heck, you can even do it across a network. (I think serial too)


Cheers - Tony ‘Nicoya’ Mantler :slight_smile:


Tony Mantler | Proud ---- Days since the last
QNX Consulting | of our | 27 |
tony@astra.mb.ca | Record ---- “Gerbil Incident”

The gdb shipped with 6.1 will support this.

In the meantime, you could spawn it held (on -h Python), then attach
to it and do a slay -u Python

Armin Steinhoff <A-Steinhoff@web_.de> wrote:

Hi,

I tried to debug Python in interactive mode with gdb, but gdb uses
also
std in/out … so I have no chance to enter commands interactively
for Python.

Does anyone know how to use gdb in such a case??

Thanks

Armin


cburgess@qnx.com

Armin Steinhoff a écrit :

Hi,

I tried to debug Python in interactive mode with gdb, but gdb uses
also
std in/out … so I have no chance to enter commands interactively
for Python.

Does anyone know how to use gdb in such a case??

Thanks

Armin

If you can use DDD, you can go to Program menu and check ‘Run in
Execution Window’ then run…

Alain.