Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Pretty printer bug number

+ttromey@redhat

On Fri, Jan 8, 2010 at 5:10 PM, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:
Hi Terry.

> Marc, this is nice!  I'm seeing the pretty printed display of strings, maps, vectors, etc.  This is going to make a lot of people happy.
> Are the plans to commit this to only the 3.6 branch, or is there any chance it will be in 3.5.2 as well?

That is a good idea.  It is a small enough patch.  Could you make the request on the bug so it does not slip between the cracks?

Done. 

> Have you given thought to what it would take to be able to toggle the actual variables between a pretty-printed view and a raw view?
> It means completely avoiding use of the -var-list-children MI command, since that still reports the raw format.
> Would it be easy to inject an alternate handling of variables that issued the cli print command and interpreted its results?

Actually, MI does support pretty-printing but it requires some special request from DSF-GDB to turn this on.
I don't think it would be very hard, but I've been so busy with so many other things that I didn't have time to figure
out what those MI changes are.  They are all documented in GDB... Someone just needs to take the time to read it and digest it.
If someone from the community could try making some headway on it, that would speeds things up.

In my emails with Tom Tromey, my understanding is that only a subset of the MI commands understand how to do pretty printing.  So if you ask a vector how many children it has, it reports the number of elements contained in the vector, and if you then -var-list-children for the number of children returned, you get an index exception because that command returns the raw implementation information, and a vector typically has a single child, its implementation class.  Fixing this problem looks like a lot of effort in GDB.

Interestingly, the NetBeans C++ support doesn't have this problem, it never issues the MI commands that cause trouble.


>  Or does DSF support anything like the org.eclipse.debug.core.logicalStructureProviders extension point?

I'm not familiar with that extension point, but in DSF and DSF-GDB, we don't use any extension points.

The reason an extension point is interesting is because different pretty print libraries may use different formatting, and it is nice to allow custom interpretation of the data.  Probably a better solution would be to add a "--pretty_print_annotations" flag to gdb that pretty printers would use to provide standard annotations allow other tools to unambiguously interpret the data being returned.


It's nice to see interest on this fix.

Definite interest on pushing this along, thanks for the start!

--Terry 

Marc

On Tue, Jan 5, 2010 at 8:27 AM, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx<mailto:marc.khouzam@xxxxxxxxxxxx>> wrote:
Hi,

as discussed in the conference call, here is the bug that focuses on support for GDB 7.0 pretty printers for DSF-GDB
https://bugs.eclipse.org/bugs/show_bug.cgi?id=275238

There is a prototype patch attach that is small and easy to try.

Marc


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx<mailto:cdt-dev@xxxxxxxxxxx>


Back to the top