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: [RFC - Python] New ObjFile event & GDB Async


On Tue, Oct 4, 2011 at 5:24 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
>
> Kevin> (the patch intends to provide a Python binding for the 'new
> Kevin> objectfile' observer. There's nothing complicated in the code, just
> Kevin> emit a new event upon observer notification, which triggers the Python
> Kevin> function registered for this event)
>
> Kevin> However, when I want to execute `gdb.execute("some function")` during
> Kevin> the callback, the execution ends up in:
> [...]
>
> I don't know exactly what is going on here, but I think there are
> situations where it is not safe to use gdb.execute. ?We don't document
> this right now, but we should; I think the problem is just that we don't
> know all the cases.
>
> Tom

yes, indeed. The problem is first to identify these situations, and
then decide whether GDB should be fixed to make it safe, or forbid
such a call.

However, I thought it shouldn't be "gdb.execute" which is not safe,
but rather the command to be executed. For instance, in my case it was
"set confirm off" which highlighted the bug, and I guess that there is
no real reason for it not to be safe. (In opposition with `continue',
`detach`, ...)


Kevin


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