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: Patch to propagate GDB's knowledge of the executing state to frontend


On 11/13/2012 07:57 PM, Tom Tromey wrote:
Luis>  Should frontends relying on MI information treat ^error specially and
Luis>  not look for any *stopped records?

I don't know the answer to this. I did find this though:

http://sourceware.org/bugzilla/show_bug.cgi?id=7778

I tend to think it would be cleanest if gdb were to emit a *stopped in
case of error -- but only if it previously emitted *running.  I don't
know how feasible this is.

Right. That seems to be what Ali's patch is attempting to address, in order to improve the relationship with the frontends.



Luis> The MI specification gives room for slightly different interpretations Luis> unfortunately.

For me, the text for "*running" is pretty clear:

      The frontend should assume that no interaction with a
      running thread is possible after this notification is produced.

I'm curious where the text is that gives room for another approach.

I wanted to know what is to be done once an ^error is thrown at the frontend and how it should behave.


There is this text:

"There's no guarantee that whenever an MI command reports an error, gdb or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface."

It is not clear how things need to be refreshed, specially when the frontend needs to assume a thread/inferior is still running after it saw ^running but did not see a *stopped record, though it did see an ^error. But ^error does not imply the target has stopped.

So it needs to refresh information, but should it forget the target was running and attempt to fetch data anyway or should it do something else?

In the case of all-stop mode, we know the inferior is stopped. This may not be true for non-stop though.

Luis


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