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: gdb-patches at sourceware dot org
- Date: Tue, 04 Oct 2011 11:01:50 -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> <CAPftXUK5BfDaq=AAHLTeZ2jLW-=Rc05D8U2SAcAVaW47gzMx7w@mail.gmail.com>
>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
Tom> Why not simply make the objfile object an attribute of the event?
Tom> That seems cleaner to me.
Kevin> We already discussed this point, but it was at the end of ... March :)
Thanks for the reminder.
I completely forgot about that.
Kevin> I was ambivalent about this point too; I chose
Kevin> "gdb.current_objfile()" because autoloading
Kevin> (http://sourceware.org/gdb/current/onlinedocs/gdb/Auto_002dloading.html)
Kevin> already does it this way, and the two features are pretty similar. I
Kevin> felt that it would have been strange to access "gdb.current_objfile ()"
Kevin> in one case, and sth like "event.new_objfile" in the other case
Ok, I see.
I think it is best to pass it as part of the event.
It is ok with me if you also want to have it set the current objfile.
Tom