How I can print value of share pointer stored in set. Print gdb share_ptr from C++ set.
p field_set
$30 = std::set with 5 elements = {
[0] = std::shared_ptr (count 2, weak 0) 0x862030,
[1] = std::shared_ptr (count 2, weak 0) 0x863630,
[2] = std::shared_ptr (count 2, weak 0) 0x863710,
[3] = std::shared_ptr (count 2, weak 0) 0x8637f0,
[4] = std::shared_ptr (count 2, weak 0) 0x8638d0
As you can see share_ptr are stored in C++ set value. How I can print value ?
I have already tried below input, its not working :
1. p *(field_set)._M_ptr
//No symbol "driverl" in current context.
2. p *(field_set[0])._M_ptr
//No symbol "operator[]" in current context.