This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [expr-cumulative] RFA fix PR 9708
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Tue, 26 Jan 2010 14:08:30 -0700
- Subject: Re: [expr-cumulative] RFA fix PR 9708
- References: <m34om8lp7o.fsf@fleche.redhat.com> <4B5F5663.6090301@redhat.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
Keith> One question: should one be able to print the value of this static
Keith> OUTSIDE the specific block in which it is defined? "print
Keith> K::m::themagicstatic"?
It would have to be some other syntax, because this is valid:
struct K {
int m () {
static bool themagicstatic = false;
return themagicstatic ? 23 : 24;
}
class m {
static bool themagicstatic;
};
};
... and K::m::themagicstatic unambiguously refers to the member of
class m.
I thought about trying to make K::m()::themagicstatic work, but that
also seems like a pain.
Keith> This would almost certainly be a contrivance on our part for the sake
Keith> of debugging, but it seems a reasonable thing to be able to do.
I agree. I think it is a separate problem, though, because it would be
nice to also make it work for C, where there is no demangled form, etc.
Maybe if we ever get "HPD-like" in our symbol naming, or something like
that.
Keith> In any case, I don't have a problem with your patch.
Thanks, I'll commit shortly.
Tom