This is the mail archive of the gdb-patches@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: [RFA] PR python/13598 - add before_prompt event


On 22/07/16 11:01, Yao Qi wrote:
> Hi Tom,
> 
> On Sat, May 21, 2016 at 6:00 AM, Tom Tromey <tom@tromey.com> wrote:
>> This adds an event that is emitted just before GDB presents a prompt
>> to the user.  This provides Python code a way to react to whatever
>> changes might have been made by the previous command.  For example, in
>> my GUI I use this to track changes to the selected frame and reflect
>> them in the UI.
> 
> I read this patch multiple times, but don't know the motivation of adding this
> event.  In PR python/13598, you mentioned you want to get event when
> something is changed.  If so, why don't you add the python event for the changes
> you are interested in?  What is your use case of using python code in GDB?

The use-case seems clear to me. 

Old workflow:

gdb-prompt -> command entered -> gdb does something -> gdb finishes ->
gdb displays prompt

New workflow:

gdb-prompt -> command entered -> gdb does something -> gdb finishes ->
notifies interested observers -> gdb displays prompt

I think it would be useful to know the time when GDB is done
processing the event queue and before it displays the prompt and waits
on user input.

Cheers

Phil


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