This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC - Python] New ObjFile event
- From: Tom Tromey <tromey at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org
- Date: Wed, 05 Oct 2011 08:16:12 -0600
- Subject: Re: [RFC - Python] New ObjFile event
- References: <AANLkTimybJtpUzy13FuLxQQMJfeWQuf3-cgqGmu23Bq5@mail.gmail.com> <AANLkTin=YO__Mz88HPFoT7a6_it5BxthnUdODJMs52eG@mail.gmail.com> <m362r3q9ih.fsf@fleche.redhat.com> <AANLkTikmMVf7Lz=8ccdXeo1WG8k+ivHMCXkC7BkZkLNP@mail.gmail.com> <AANLkTi=ObZFW+uoecfzvHhXr55zYZzSgX2ocJJrvXDv0@mail.gmail.com> <m339m4dgzr.fsf@redhat.com> <AANLkTima2Kk8C16hjj0kTtvsH9W33CbiE2y6wrVQXns5@mail.gmail.com> <m3ipt68mrs.fsf@fleche.redhat.com> <BANLkTi=NqJK6c+Cbvhc1M2fE=cS=5khSJg@mail.gmail.com> <CAPftXUKyge-BpB05PTn=5C=1HG6hgv8eS9rDYiZhooVMrrgZuQ@mail.gmail.com> <E1Qz4Lp-0007E1-Kl@fencepost.gnu.org> <CAPftXULTp2Z9PsY_RM+MAwahcEjNk2s=kgqUhz1guCMYUXGN9g@mail.gmail.com> <m3botyujd4.fsf@fleche.redhat.com> <CAPftXULEe9R4m7tF=vtJe6NTXHSFAkXgsHCPb3r0mU4wKx0FFg@mail.gmail.com> <m3vcs4oflt.fsf@fleche.redhat.com> <CAPftXULAgW_X22mqam+W6DUca-K-1VXtyxinwSLdwDfgcHi2tA@mail.gmail.com>
>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
Tom> I think it is best to pass it as part of the event.
Tom> It is ok with me if you also want to have it set the current objfile.
Kevin> I got rid of the "gdb.current_objfile ()" access to the objfile and
Kevin> kept only the "NewObjFile.new_objfile" attribute of the Event object,
Kevin> which indeed makes more sense.
Kevin> I've updated the code and documentation accordingly; could you please
Kevin> tell me if it seems good for you?
It needs another doc review.
One nit on the code:
Kevin> (gdbpy_current_objfile): New global variable.
Kevin> * python/python.c (gdbpy_current_objfile): Make global.
Now that you aren't setting this in the event generator, there is no
need for these hunks.
The code bits are ok with that changed.
Tom