[Bug 17499] New: The "frame variable" command does not parse std::vector or std::list with gcc

Bug ID 17499
Summary The “frame variable” command does not parse std::vector or std::list with gcc
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter ashok.thirumurthi@intel.com
Classification Unclassified

Created attachment 11342 [details]
Log of dotest.py -C gcc -A x86_64 for *StdVector.py

This regression was introduced by "r191996 - <rdar://problem/12042982>" and
reproduced by the Linux buildbot with gcc 4.6.2 and separately confirmed on
Ubuntu 12.04 with gcc 4.6.3.
  [http://llvm.org/viewvc/llvm-project?revision=191996&view=revision](http://llvm.org/viewvc/llvm-project?revision=191996&view=revision)

For instance, with the attached test log, the expected output is:

runCmd: frame variable strings
output: (string_vect) strings = size=3 {
    [0] = "goofy"
    [1] = "is"
    [2] = "smart"
}

The actual result is:

runCmd: frame variable strings
output: (string_vect) strings = size=3 {
    [0] = (_M_dataplus = std::basic_string<char, std::char_traits<char>,
std::allocator<char, char>, char, std::char_traits<char>, std::allocator<char,
> >::_Alloc_hider @ 0x00000000016d2110)
    [1] = (_M_dataplus = std::basic_string<char, std::char_traits<char>,
std::allocator<char, char>, char, std::char_traits<char>, std::allocator<char,
> >::_Alloc_hider @ 0x00000000016d2118)
    [2] = (_M_dataplus = std::basic_string<char, std::char_traits<char>,
std::allocator<char, char>, char, std::char_traits<char>, std::allocator<char,
> >::_Alloc_hider @ 0x00000000016d2120) }

Enrico Granata changed bug 17499

What Removed Added
Status NEW ASSIGNED
CC egranata@apple.com
Assignee lldb-dev@cs.uiuc.edu egranata@apple.com

Comment # 1 on bug 17499 from Enrico Granata

I am building ToT LLDB on Linux to reproduce. For the time being, one thing
strikes me as weird:

    [0] = (_M_dataplus = std::basic_string<char, std::char_traits<char>,
std::allocator<char, char>, char, std::char_traits<char>, std::allocator<char,
> >::_Alloc_hider @ 0x00000000016d2110)

"std::allocator<char, char>” seems wrong.. std::allocator takes *ONE* template
argument, not two. This might be a debug info issue that this patch is tickling
the wrong way. 

In that case, one might of course special case "std::basic_string<char,
std::char_traits<char>, std::allocator<char, char>, char,
std::char_traits<char>, std::allocator<char, char> >” for the sake of making
GCC work