Elena Zannoni wrote: > > Keith Seitz writes: > > [off list] > > > > On Mon, 21 Oct 2002, Elena Zannoni wrote: > > > > > How are the fields organized within the structure? I am a bit confused by the > > > decreasing 'i'. > > > > They are organized in the order they are output in the debug info. > > Originally, the code presumed that the debug info was ordered. I also have > > a version of this patch (which I sent to Jeff) which removes this > > bad assumption entirely. > > > > It runs through the code and computes the childrens' indices on the fly. > > It's not as efficient as this, but it does get rid of the bad assumption > > entirely. > > > > Keith > > > > Yeah, I saw the rewrite of the patch after I sent this mail out, so > disregard. I think Fernando approved the new version, and I am only > bitching about the streq's. > :-) > > Elena I have changed the STREQs over and also added a test case to the gdb.mi testsuite. The code is checked in. I have included the patches. gdb/ChangeLog: 2002-11-05 Jeff Johnston * varobj.c (child_exists, cplus_number_of_children): Change STREQ macro references to strcmp. (cplus_name_of_child): Change code to handle the fact that fields are not necessarily contiguous with regards to their access control. This is a fix for PR gdb/792. gdb/testsuite/gdb.mi/ChangeLog: 2002-11-05 Jeff Johnston * gdb792.cc: New file to test patch for PR gdb/792. * gdb792.exp: Ditto.