All of lore.kernel.org
 help / color / mirror / Atom feed
* How to enable libstdc++ Pretty Printers in GDB #poky
@ 2024-01-29 13:13 Rahul Chauhan
  2024-01-29 19:08 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Rahul Chauhan @ 2024-01-29 13:13 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Hi Team,

Can any one please help me  to enable libstdc++ Pretty Printers in GDB .

As of now i am only seeing below pretty printer enable.
(gdb) info pretty-printer
global pretty-printers:
builtin
mpx_bound128

I tried
IMAGE_INSTALL:append = " libstdc++" but unfortunately no luck.

Thanks
Rahul Chauhan

[-- Attachment #2: Type: text/html, Size: 651 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] How to enable libstdc++ Pretty Printers in GDB #poky
  2024-01-29 13:13 How to enable libstdc++ Pretty Printers in GDB #poky Rahul Chauhan
@ 2024-01-29 19:08 ` Khem Raj
  2024-01-31  5:27   ` Rahul Chauhan
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2024-01-29 19:08 UTC (permalink / raw)
  To: Rahul Chauhan; +Cc: openembedded-core

On Mon, Jan 29, 2024 at 5:13 AM Rahul Chauhan
<rahulchauhankitps@gmail.com> wrote:
>
> Hi Team,
>
> Can any one please help me  to enable libstdc++ Pretty Printers in GDB .
>
> As of now i am only seeing below pretty printer enable.
> (gdb) info pretty-printer
> global pretty-printers:
>   builtin
>     mpx_bound128
>
> I tried
>
> IMAGE_INSTALL:append = " libstdc++"

yeah libstdc++ pretty printing is provided via printer.py which is
part of gcc-runtime-dbg package so try
adding  IMAGE_INSTALL:append = " gcc-runtime-dbg" and see if if it
helps. You will also need to add

set auto-load safe-path /

temporarily, or apply a backport of this fix [1] to your core layer

[1] https://lore.kernel.org/openembedded-core/20240129190654.2553357-1-raj.khem@gmail.com/T/#u



>
> but unfortunately no luck.
>
> Thanks
> Rahul Chauhan
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#194460): https://lists.openembedded.org/g/openembedded-core/message/194460
> Mute This Topic: https://lists.openembedded.org/mt/104030581/1997914
> Mute #poky:https://lists.openembedded.org/g/openembedded-core/mutehashtag/poky
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to enable libstdc++ Pretty Printers in GDB #poky
  2024-01-29 19:08 ` [OE-core] " Khem Raj
@ 2024-01-31  5:27   ` Rahul Chauhan
  2024-01-31  7:01     ` [OE-core] " Khem Raj
  2024-01-31  7:51     ` Rahul Chauhan
  0 siblings, 2 replies; 5+ messages in thread
From: Rahul Chauhan @ 2024-01-31  5:27 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi Khem Raj,

Thankyou very much for quick solution.

I backported patch and added below line in local.conf and its working fine.
IMAGE_INSTALL:append = " gcc-runtime-dbg"

but but when i am checking *info pretty-printer* i am not seeing libstdc++-v6 in the list
(gdb) info pretty-printer
global pretty-printers:
builtin
mpx_bound128

But I was expecting
(gdb) info pretty-printer
global pretty-printers:
builtin
mpx_bound128
libstdc++-v6

Can you please comment on this?

[-- Attachment #2: Type: text/html, Size: 1588 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] How to enable libstdc++ Pretty Printers in GDB #poky
  2024-01-31  5:27   ` Rahul Chauhan
@ 2024-01-31  7:01     ` Khem Raj
  2024-01-31  7:51     ` Rahul Chauhan
  1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2024-01-31  7:01 UTC (permalink / raw)
  To: Rahul Chauhan; +Cc: openembedded-core

On Tue, Jan 30, 2024 at 9:27 PM Rahul Chauhan
<rahulchauhankitps@gmail.com> wrote:
>
> Hi Khem Raj,
>
> Thankyou very much for quick solution.
>
> I backported patch and added below line in local.conf and its working fine.
> IMAGE_INSTALL:append = " gcc-runtime-dbg"
>
> but but when i am checking info pretty-printer i am not seeing libstdc++-v6 in the list
> (gdb) info pretty-printer
> global pretty-printers:
> builtin
> mpx_bound128
>
> But I was expecting
> (gdb) info pretty-printer
> global pretty-printers:
> builtin
> mpx_bound128
> libstdc++-v6
>
> Can you please comment on this?

It is loaded on demand. So put a breakpoint on main and let it run
till main so that
it loads the libstdc++ library and then check again.

>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#194509): https://lists.openembedded.org/g/openembedded-core/message/194509
> Mute This Topic: https://lists.openembedded.org/mt/104030581/1997914
> Mute #poky:https://lists.openembedded.org/g/openembedded-core/mutehashtag/poky
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to enable libstdc++ Pretty Printers in GDB #poky
  2024-01-31  5:27   ` Rahul Chauhan
  2024-01-31  7:01     ` [OE-core] " Khem Raj
@ 2024-01-31  7:51     ` Rahul Chauhan
  1 sibling, 0 replies; 5+ messages in thread
From: Rahul Chauhan @ 2024-01-31  7:51 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2334 bytes --]

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 tput 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 se 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 permitted
[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 = "test"
(gdb) p vi
$2 = std::vector of length 3, capacity 4 = {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

[-- Attachment #2: Type: text/html, Size: 17394 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-31  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 13:13 How to enable libstdc++ Pretty Printers in GDB #poky Rahul Chauhan
2024-01-29 19:08 ` [OE-core] " Khem Raj
2024-01-31  5:27   ` Rahul Chauhan
2024-01-31  7:01     ` [OE-core] " Khem Raj
2024-01-31  7:51     ` Rahul Chauhan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.