This is the mail archive of the gdb@sourceware.org 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: [Python] Input from user from extended breakpoint `stop' function


>> 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 ...


Cordially,

Kevin


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