Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to enable GDB pretty print for g_std? #252

Open
YalandHong opened this issue Apr 12, 2021 · 0 comments
Open

Is there any way to enable GDB pretty print for g_std? #252

YalandHong opened this issue Apr 12, 2021 · 0 comments

Comments

@YalandHong
Copy link

I think GDB can't recognize g_map as a container. When I try to print a g_map in GDB, it prints all the member fields and only the root node.

Other containers in g_std, such as g_vector and g_string, have the same problem, making them not friendly for debugging.

{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic
_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_s
tring<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx:
:new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_tr
aits<char>, std::allocator<char> > const, std::basic_string<char, std::char_trai
ts<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>},
 _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_trait
s<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_head
er = {_M_color = std::_S_red, _M_parent = 0x30c66e20, _M_left = 0x30c66fd0, _M_r
ight = 0x30c66df0}, _M_node_count = 12}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant