This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC - Python] New ObjFile event & GDB Async
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <pedro at codesourcery dot com>
- Date: Wed, 5 Oct 2011 13:31:59 +0200
- Subject: Re: [RFC - Python] New ObjFile event & GDB Async
- References: <CAPftXU+jJHxERoFs-_MMNy==YeCVjbg-X8FYkrK+fEwtj6fhRg@mail.gmail.com> <m3ehysrd9b.fsf@fleche.redhat.com>
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