Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] C++ STL Pretty Printing with TCF?

All,

I am not sure how it done by the Eclipse plugin for GDB, but we (Wind
River) did that in out TCF based gdb-like shell (we use dinkum STLs) :

(wrdbg) print s1
$281 = {<std::std::_String_val<char, std::allocator<char>>> = {<std::_String_base> = {<std::_Container_base> = {__dummy = -128 '\0200'}, __dummy = -128 '\0200'}, _Alval = {<std::std::_Allocator_base<char>> = {__dummy = -128 '\0200'}, __dummy = -128 '\0200'}}, npos = 4294967295, __b_St11_String_valIcSaIcEE = {<std::_String_base> = {<std::_Container_base> = {__dummy = -128 '\0200'}, __dummy = -128 '\0200'}, _Alval = {<std::std::_Allocator_base<char>> = {__dummy = -128 '\0200'}, __dummy = -128 '\0200'}}, _Bx = <no value>, _Mysize = 10, _Myres = 15}
(wrdbg) enable pretty-printer
0 printers enabled
16 of 16 printers enabled
(wrdbg) info pretty-printer
global pretty-printers:
  windriver
    std::deque
    std::deque::iterator
    std::list
    std::list::iterator
    std::map
    std::map::iterator
    std::multimap
    std::multimap::iterator
    std::queue
    std::set
    std::set::iterator
    std::stack
    std::string
    std::string::iterator
    std::vector
    std::vector::iterator
(wrdbg) whatis s1
type = string
(wrdbg) print s1
$283 = "Wind River"
(wrdbg)


To do that we had to create gdb values with python, using the Python
opensource. This is quite a huge job to do, and I guess that doing it
in all the clients would be quite long.

Still, it is possible ...

Hope this helps

DERF

On 04/05/2016 11:46 AM, Docteur, David wrote:
Hi Sven,

I had to do Pretty Printing research last year, and TCF was one of the solutions to explore. Unfortunately, we couldn't find any way of pretty printing
with TCF, or at least, without heavily modifying the existing code.

David

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Sven Schwermer
Sent: Tuesday, April 5, 2016 10:32 AM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] C++ STL Pretty Printing with TCF?

Hi there!

Is it possible to pretty print C++ STL containers with TCF? This is possible with GDB in Eclipse using a set of Python extensions: See https://wiki.eclipse.org/CDT/User/FAQ#How_can_I_inspect_the_contents_of_STL_containers.3F

Thanks!

Sven

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev



Back to the top