This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI varobj artificial fields


I assumed that in cases where the protections were interleaved it was just cruft of history, and if you were going to see protections at all, it would make more sense to put them in just three groups. If you have turn-outs, then of course it makes more sense to have three, since otherwise you do a little "did I turn out the right private" dance which is pretty annoying. There probably isn't one correct answer to this question.

Jim

On Apr 16, 2008, at 11:36 AM, Daniel Jacobowitz wrote:
On Wed, Apr 16, 2008 at 11:21:53AM -0700, Jim Ingham wrote:
Yeah, I think this was just added so you get the organization for free.
Note that if you go switch to an attribute, the UI is going to have to
reorder the variables to get all the private ones together, etc.

Is that really what you'd want? GDB's ptype will group things by protection in the order they're present anyway, repeating protections if that's what the source did. I think this is much more logical.

class foo
{
 public:
   int a;

 private:
   int b;

 public:
   int c;
};

--
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]