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 8/8] mi/python: Allow redefinition of python MI commands


On 2019-05-07 9:19 a.m., Jan Vrany wrote:
> On Tue, 2019-05-07 at 09:09 -0400, Simon Marchi wrote:
>> On 2019-05-07 7:25 a.m., Jan Vrany wrote:
>>> I see. I just added a test for this case into "almost finished" 
>>> v2 of the patch series. There, this problem is kind of avoided by 
>>> making sure that in mi_command_py::invoke anything from "this" 
>>> mi_command_py object is not accessed AFTER calling the python code. 
>>>
>>> However I agree that using shared_ptr is more robust solution.
>>
>> If we know that we don't access that pointer after it is possibly stale, and
>> we document that fact properly, I think we can keep what you had initially.
>> Using shared_ptr has a cost, and it's not really essential here.
>>
> 
> All right. Thanks!

Well that's my opinion, let's see what Tom thinks about it.

Simon


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