This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Debug Methods in GDB Python
- From: Siva Chandra <sivachandra at google dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 15 Nov 2013 16:53:53 -0800
- Subject: Re: [RFC] Debug Methods in GDB Python
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gyKTCdcjMcbfnc4zV3+yEt9tCTJzS8eW92dQrQzikRaTQ at mail dot gmail dot com> <CAGyQ6gxzG8vuPyFKHpacHS7W7jMEReidWDBkNJjywOXADXgVnw at mail dot gmail dot com> <87r4hefx59 dot fsf at fleche dot redhat dot com> <CAGyQ6gw_-MOu4Y9D+mUf-A55_Ms+j9JAmM9dU0y8PdJw73EkNw at mail dot gmail dot com> <871u995pbt dot fsf at fleche dot redhat dot com> <CAGyQ6gywGMDwmm9fHpPGhwE9vrki1VE8uDM2hRFEAvCZKaTyJg at mail dot gmail dot com> <87ehaq5nkr dot fsf at fleche dot redhat dot com> <CAGyQ6gwT5+Jmu4bqgakjCWmmZtWjbd83n0qq=B9ctfWjv7oS_w at mail dot gmail dot com> <87txfds4vf dot fsf at fleche dot redhat dot com> <CAGyQ6gzaht0KYTxdFFZDeAo5hxesOmjCAiVomX8d_eV4XGK_CQ at mail dot gmail dot com> <CADPb22TgkC-KBhAoYvNBueOKrHAFWwvd9TgYaQ2=Oq5qsFoZrA at mail dot gmail dot com>
On Fri, Nov 15, 2013 at 4:05 PM, Doug Evans <email@example.com> wrote:
> It would be good to provide enable/disable/info support akin the the
> python pretty-printers.
Yes. I am planning to bring them in the next version of the patches.
> The original pretty-printers used regexps for matching but that was
> IIUC found to be excessively general.
> We might want to avoid them in the basic versions of debug methods.
Do you have an alternate approach in mind?
> I could be wrong but it seemed like errors were handled differently
> than in the pretty-printers.
> The inconsistency doesn't feel warranted.
Yes, there is a difference.
> IIRC the "ext_lang" stuff was going to be deleted, right?
I am not sure. Tom had a comment long time back on this, but his
latest review said that his comments on this might be irrelevant now.
I have renamed some of the pieces related to this in my last patch. Do
you have any specific comments?
> What are debug method groups for?
They are for disabling and enabling a group of debug methods. For
example, they could be used for debugging the debug methods themselves
or writing tests for them: You can disable a group at once instead of
> One thought I had, and this is mostly for discussion's sake,
> is why stop at providing support for user-defined methods (incl. operators)?
> Why not allow anything that might be "hand called" to be implemented in Python?
I think that could be a fairly straightforward extension. Do you want
it to be done together with this work?
> [One way of implementing user-defined methods/operators was to
> translate, e.g. my_stl_vector, into a "pseudo- hand call",
> and then call into Python at the point where we would have hand-called
> the inferior instead.]
IIRC, you had suggested similar ideas earlier as well. However, I have
not gone that route because I thought debug methods/functions should
go through the method/function matching infrastructure. Am I missing