Author Topic: debugger inconsistencies  (Read 3095 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
debugger inconsistencies
« on: August 17, 2016, 10:38:54 am »
Very often our debugger (tooltip or add watch) refuses to show the value of a watched variable.

I now have a case where I have even inconsistencies in this behavior.

I have a class, and have the breakpoint in the body of the constructor.

That constructor :
- one of it's arguments : const std::vector<std::string>& multicastInterfaces    ==> watching this one fails (similar error messages and the one being presented below)
- in it's init list : mMulticastInterfaces(multicastInterfaces)  (const std::vector<std::string> mMulticastInterfaces)
- watching mMulticastInterfaces fails (tooltip) or by adding it to the watch list (it has size 2 and capacity 2) :
Quote
Couldn't find method std::__debug::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::c_str
- how ever when adding to the watch window (*this) and expanding it the member mMulticastInterfaces is nicely shown !!!! (std::__debug::vector of length 2, capacity 2, and the 2 entries)

could this debugging experience be improved, my personal feeling is, such things seem to happen a lot.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger inconsistencies
« Reply #1 on: August 17, 2016, 08:26:21 pm »
Can you post minimal sample and steps to reproduce?
It seems you're using pretty printers. Which version of gdb/gcc/os are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]