This is the mail archive of the
mailing list for the Archer project.
Re: [python][rfc] Rename gdb.Breakpoint getter methods.
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: archer ml <archer at sourceware dot org>
- Date: Fri, 05 Dec 2008 16:39:56 -0700
- Subject: Re: [python][rfc] Rename gdb.Breakpoint getter methods.
- References: <email@example.com><firstname.lastname@example.org>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Thiago" == Thiago Jung Bauermann <email@example.com> writes:
Thiago> Most breakpoint properties can change (condition, commands, thread,
Thiago> is_valid, is_enabled, is_silent, hit_count, ignore_count), so I kept
Thiago> them as methods, just removing the get_ prefix.
It seems to me that if we support changing the property from Python,
then an attribute with side effects is natural. E.g.:
b.ignore_count = 5
b.silent = True
The changeability of things like the condition does not seem like a
severe problem in this case. We don't support setting all the
attributes from Python -- but there's no reason we shouldn't.
Thiago> But perhaps number and location (can it ever change?) could be
Thiago> changed to attributes?
Location is immutable in gdb, though I don't know why.
We could enable this from Python, too.
Number ought to be fixed.
So, I think basically all of these should be attributes.
What do you think? Is this too magical?