koutheir / libcxx-pretty-printers

Moved: https://codeberg.org/koutheir/libcxx-pretty-printers
https://codeberg.org/koutheir/libcxx-pretty-printers
GNU General Public License v3.0
148 stars 51 forks source link

There is no member or method named __short_mask #17

Closed mariuszmaximus closed 1 year ago

mariuszmaximus commented 1 year ago

My platform: Windows 10, Msys2, clang 15.0.5

test code:

int main(int argc, char *argv[])
{
    std::string koza{"koza"};
    spdlog::info("{}",koza); // break point here 
} 

GDB>> p koza

Python Exception <class 'gdb.error'>: There is no member or method named __short_mask.

my std::string content without libcxx-pretty-printers

$2 = {
  static __endian_factor = 2,
  __r_ = {
    <std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {
      __value_ = {
        {
          __l = {
            {
              __is_long_ = 0,
              __cap_ = 209332974980
            },
            __size_ = 0,
            __data_ = 0x51 <error: Cannot access memory at address 0x51>
          },
          __s = {
            {
              __is_long_ = 0 '\000',
              __size_ = 4 '\004'
            },
            __padding_ = 0x14fe79 "koza",
            __data_ = "koza", '\000' <repeats 11 times>, "Q\000\000\000\000\000\000"
          },
          __r = {
            __words = {418665949960, 0, 81}
          }
        }
      }
    }, 
    <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {
      <std::__1::allocator<char>> = {
        <std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>},
  static npos = 18446744073709551615
mariuszmaximus commented 1 year ago

solution in fork libcxx-pretty-printers

koutheir commented 1 year ago

Thank you for the pointer. I'll pull some of these changes.

koutheir commented 1 year ago

@mariuszmaximus, can you check that the latest commits fix this issue?

mariuszmaximus commented 1 year ago

is OK , thx !