This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: gdb pretty-printers for libstdc++


>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@gmail.com> writes:

Jonathan> I'm very pleased to see this coming to gdb, I'll be trying
Jonathan> it out as soon as I can.

Awesome.  I can send instructions on getting and building the
appropriate branch if you want.  It is very easy to get started with.

Jonathan> +    # smart_ptr?  seems to only be in boost right now

Jonathan> There's no smart_ptr class, not sure what this means :-)

Yeah, me neither.  And I'm sure I wrote this comment :)

Jonathan> There's no std::tr1::unique_ptr, only std::unique_ptr.

Thanks.  Either Phil or I will fix this plus the other issues you
raise.

A test suite for this would be good but we won't get to it in the
short term.

Jonathan> shared_ptr, weak_ptr and the unordered_xxx containers exist in
Jonathan> namespace std as well as namespace std::tr1, so maybe the regex should
Jonathan> be '^std::(tr1::)?shared_ptr<.*>$' and similar.

The lookup here is all done by following all typedefs until we find
the type's "true" name.  My recollection from when I wrote these is
that this always resolves to the std::tr1 names.  Anyway, we can test
it and see.

Jonathan> +class StdPointerPrinter:

Jonathan> _M_refcount is a class containing a pointer, not the actual refcount.
Jonathan> Should it print _M_refcount._M_pi->_M_usecount instead?

Yeah.

Tom


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