Re: [RFC - Python] New ObjFile event

Kevin Pouget
2011-03-28T09:03:32Z

> I'm not sure on the status of 8.3 file naming conventions, whether they
> matter anymore.

I would say no, because python/py-threadevent.c already exists :)

>> +/*static*/ struct objfile *gdbpy_current_objfile;

> I realize this is something you are unsure of, but if you decide to emit
> 'static' can you remove the comment too.
sure, I let the 'static' in comments to highlight that I don't really
want to do, this will be cleanup as soon as I get a better solution

> + gdbpy_initialize_new_objfile_event() ;
> Needs a space after event and before the bracket.
done

>> Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
> Just 2011 here.
done

> Oops forgot to mention, this patch is missing tests, documentation and a
> ChangeLog entry. I realize this was/is an RFC, but the tests help
> "prove" the patch for maintainers. Looking good, though!
I didn't know about it, I'll prepare it today

Thanks for your advises,

Kevin

On Mon, Mar 28, 2011 at 4:54 AM, Phil Muldoon <pmuldoon@redhat.com> wrote:
> Kevin Pouget <kevin.pouget@gmail.com> writes:
>
>> Hello,
>>
>> following this discussion at
>> http://sourceware.org/ml/gdb/2011-03/msg00136.html, I would like to
>> suggest a patch for the Python event system. Based on the ''exited",
>> "cont", ... events, this patch allows a python script to register an
>> interest to the loading of new object files in the debuggee. GDB
>> observer "observer_attach_new_objfile" is used to trigger the Python
>> callback.
>>
>> This patch completes the auto-loading feature
>
> Oops forgot to mention, this patch is missing tests, documentation and a
> ChangeLog entry.  I realize this was/is an RFC, but the tests help
> "prove" the patch for maintainers.  Looking good, though!
>
> Cheers
>
> Phil
>