From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDB7FC47258 for ; Wed, 31 Jan 2024 07:51:55 +0000 (UTC) Subject: Re: How to enable libstdc++ Pretty Printers in GDB #poky To: openembedded-core@lists.openembedded.org From: "Rahul Chauhan" X-Originating-Location: Melbourne, Victoria, AU (155.190.53.4) X-Originating-Platform: Windows Chrome 121 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 30 Jan 2024 23:51:52 -0800 References: <10032.1706678833265291851@lists.openembedded.org> In-Reply-To: <10032.1706678833265291851@lists.openembedded.org> Message-ID: <10032.1706687512615914058@lists.openembedded.org> Content-Type: multipart/alternative; boundary="nX6uddnfhFIq4X030Qo5" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 31 Jan 2024 07:51:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/194511 --nX6uddnfhFIq4X030Qo5 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Khem Raj, I noti ced that whe n I chec k th e in fo p rett y-pr inte r co mman d ou t= put aft er l oadi ng t he t est appl icat ion with gdb , it is show ing the expe cted beh avio r. T his mean s th at e very thin g s= e ems to b e fu ncti onin g co rrec tly in t hat aspe ct. Thanks for your support. bash-5.1# gdb -q test Reading symbols from test... (gdb) b 12 Breakpoint 1 at 0x234e: file test.cpp, line 12. (gdb) r Starting program: /test warning: Error disabling address space randomization: Operation not permitt= ed [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Breakpoint 1, main () at test.cpp:12 12=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0; (gdb) p s $1 =3D "test" (gdb) p vi $2 =3D std::vector of length 3, capacity 4 =3D {1, 2, 3} (gdb) info pretty-printer global pretty-printers: builtin mpx_bound128 objfile /lib/libstdc++.so.6 pretty-printers: libstdc++-v6 __gnu_cxx::_Slist_iterator __gnu_cxx::__8::_Slist_iterator __gnu_cxx::__8::__normal_iterator __gnu_cxx::__8::slist __gnu_cxx::__normal_iterator __gnu_cxx::slist __gnu_debug::_Safe_iterator std::_Bit_const_iterator std::_Bit_iterator std::_Bit_reference std::_Deque_const_iterator std::_Deque_iterator std::_Fwd_list_const_iterator std::_Fwd_list_iterator std::_List_const_iterator std::_List_iterator std::_Node_handle std::_Rb_tree_const_iterator std::_Rb_tree_iterator std::__8::_Bit_const_iterator std::__8::_Bit_iterator std::__8::_Bit_reference std::__8::_Deque_const_iterator std::__8::_Deque_iterator std::__8::_Fwd_list_const_iterator std::__8::_Fwd_list_iterator std::__8::_List_const_iterator std::__8::_List_iterator std::__8::_Node_handle std::__8::_Rb_tree_const_iterator std::__8::_Rb_tree_iterator std::__8::__cxx11::__cxx1998::list std::__8::__cxx11::basic_string std::__8::__cxx11::list std::__8::__cxx1998::_Bit_const_iterator std::__8::__cxx1998::_Bit_iterator std::__8::__cxx1998::_Bit_reference std::__8::__cxx1998::_Deque_const_iterator std::__8::__cxx1998::_Deque_iterator std::__8::__cxx1998::_Fwd_list_const_iterator std::__8::__cxx1998::_Fwd_list_iterator std::__8::__cxx1998::_List_const_iterator std::__8::__cxx1998::_List_iterator std::__8::__cxx1998::bitset std::__8::__cxx1998::deque std::__8::__cxx1998::forward_list --nX6uddnfhFIq4X030Qo5 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Khem Raj,

I notice= d that when I check the info p<= span style=3D"box-sizing: inherit; animation: 0.7s cubic-bezier(0.7, 0, 0.8= 4, 0) 0s 1 normal none running lbWRkT; color: #474340; font-family: Inter; = font-size: 15px; letter-spacing: -0.225px; white-space-collapse: preserve-b= reaks;">retty-printer command output a= fter loading the test applicat<= span style=3D"box-sizing: inherit; animation: 0.7s cubic-bezier(0.7, 0, 0.8= 4, 0) 0s 1 normal none running lbWRkT; color: #474340; font-family: Inter; = font-size: 15px; letter-spacing: -0.225px; white-space-collapse: preserve-b= reaks;">ion with gdb,
= it
is showing the expected beh<= span style=3D"box-sizing: inherit; animation: 0.7s cubic-bezier(0.7, 0, 0.8= 4, 0) 0s 1 normal none running lbWRkT; color: #474340; font-family: Inter; = font-size: 15px; letter-spacing: -0.225px; white-space-collapse: preserve-b= reaks;">avior. This means that everyth= ing seems to be functioning co<= span style=3D"box-sizing: inherit; animation: 0.7s cubic-bezier(0.7, 0, 0.8= 4, 0) 0s 1 normal none running lbWRkT; color: #474340; font-family: Inter; = font-size: 15px; letter-spacing: -0.225px; white-space-collapse: preserve-b= reaks;">rrectly in that aspect.

Thanks for your supp= ort.

bash-5.1# gdb -q test
Reading symbols from test...
(gdb) b 12
Breakpoint 1 at 0x234e: file test.cpp, line 12.
(gdb) r
Starting program: /test
warning: Error disabling address space randomization: Operation not pe= rmitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
 
Breakpoint 1, main () at test.cpp:12
12          return 0;
(gdb) p s
$1 =3D "test"
(gdb) p vi
$2 =3D std::vector of length 3, capacity 4 =3D {1, 2, 3}
(gdb) info pretty-printer
global pretty-printers:
  builtin
    mpx_bound128
objfile /lib/libstdc++.so.6 pretty-printers:
  libstdc++-v6
    __gnu_cxx::_Slist_iterator
    __gnu_cxx::__8::_Slist_iterator
    __gnu_cxx::__8::__normal_iterator
    __gnu_cxx::__8::slist
    __gnu_cxx::__normal_iterator
    __gnu_cxx::slist
    __gnu_debug::_Safe_iterator
    std::_Bit_const_iterator
    std::_Bit_iterator
    std::_Bit_reference
    std::_Deque_const_iterator
    std::_Deque_iterator
    std::_Fwd_list_const_iterator
    std::_Fwd_list_iterator
    std::_List_const_iterator
    std::_List_iterator
    std::_Node_handle
    std::_Rb_tree_const_iterator
    std::_Rb_tree_iterator
    std::__8::_Bit_const_iterator
    std::__8::_Bit_iterator
    std::__8::_Bit_reference
    std::__8::_Deque_const_iterator
    std::__8::_Deque_iterator
    std::__8::_Fwd_list_const_iterator
    std::__8::_Fwd_list_iterator
    std::__8::_List_const_iterator
    std::__8::_List_iterator
    std::__8::_Node_handle
    std::__8::_Rb_tree_const_iterator
    std::__8::_Rb_tree_iterator
    std::__8::__cxx11::__cxx1998::list
    std::__8::__cxx11::basic_string
    std::__8::__cxx11::list
    std::__8::__cxx1998::_Bit_const_iterator
    std::__8::__cxx1998::_Bit_iterator
    std::__8::__cxx1998::_Bit_reference
    std::__8::__cxx1998::_Deque_const_iterator
    std::__8::__cxx1998::_Deque_iterator
    std::__8::__cxx1998::_Fwd_list_const_iterator
    std::__8::__cxx1998::_Fwd_list_iterator
    std::__8::__cxx1998::_List_const_iterator
    std::__8::__cxx1998::_List_iterator
    std::__8::__cxx1998::bitset
    std::__8::__cxx1998::deque
    std::__8::__cxx1998::forward_list
--nX6uddnfhFIq4X030Qo5--