[Python] Input from user from extended breakpoint `stop' function

Kevin Pouget kevin.pouget@gmail.com
Wed Apr 20 07:36:00 GMT 2011

>> Any solution, or shall I send a bug report?
>  Bug report please.
http://sourceware.org/bugzilla/show_bug.cgi?id=12686 (what does PR mean ?)

>> The terminal still belongs to the inferior.  Before gdb is doing any
>> input it must call terminal_ours.
that's interesting, but why `print' functions work correctly, without
sending any SIGTTOU

> Thanks, that is good info. I did not know that.  I wonder if we should
> call that before handing over control to the python executed script in
> the breakpoint "stop" callback? Or maybe provide a Python API call to
> turn control of the TTY to GDB and likewise to the inferior.
> Any opinions on this would be great. What do you (all) think?

I would prefer a python-transparent handling, ie `terminal_ours'
called before giving the hand to the Python callback, to hide GDB's
complexity from the script interface (I guess there won't be so many
situations where this case occurs?).
However if `terminal_ours' is very costly (in comparison to the
breakpoint itself), it might not be very wise ...



More information about the Gdb mailing list