Re: [anjuta-devel] [Anjuta-devel] What about C++ STL container pretty printing



Hi Seb.
Very sorry for the late, I was busy on big project for my school. Despite I took long time to reply, I read your mail as soon as I received it.

Yeah, you're right for everything, that's what I noticed during my experiments too.

The things I was complaining about : on distros embedding gdb 7.0 python  C++ pretty printing scripts (like Fedoras >= 10), -stack-list-locals 1 is sufficient to display correctly STL container, with all their content displayed as well. It could save _a lot_ of time.

BTW, things getting me cold about var-obj is that some parts still not works, like -var-info-num-children. Annoying.

Nevertheless, I remain totally subordinate to your choice, and varobjs are maybe a more perennial way to display STL containers (despite the fact it's, in my humble opinion, a significantly more important work).

Cheers,

(PS: I add the new anjuta-devel mailing in copy since the ML moved from souceforge to gnome)

Le 21 juin 2010 22:04, Sébastien Granjoux <seb sfo free fr> a écrit :
Hi Mathieu,

Le 14/04/2010 19:54, Mathieu Dupuy a écrit :

I just tried it with a sample code with a string a list<string> ;
-enable-pretty-printing with varobj only works for the string, it still
display value={...} for the list.

To get rid of this problem, Sebastien, I suggest you drop the use of the
varobj.

I have looked at pretty printing, and it seems to work fine. The behavior that you have seen above is the expected one.

The value of a list is not displayed in MI mode, you need to list all children instead. The number of children is returned in a new way, you don't get the number of children when you create the variable object corresponding to the list. Instead you get a value has_more = 1, and you are supposed to request the children in this case, you can have 0 or more children.

Anjuta doesn't do it at the moment that's why you cannot see the member of you list. I have made a small change to always request the children and I have been able to get them. So, keeping the MI interface is fine.

I need to do this in a better way, asking for a limited number of children and allowing to easily request more children when needed. Then, I need to add some interface to allow selecting the pretty printers files. I don't see any problem with this.


At first, I have imagined to handle pretty printing as a kind of format (like binary, octal, hexadecimal...) but it's not possible. It's even not possible to disable it when set which is annoying, it will be more difficult to see a overwritten variable.

Regards,

Sébastien



--
Dupuy Mathieu
Epitech 2011.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]