[lldb-dev] Converting a pointer to python string in a formatter

2018-03-14 Thread Florin Trofin via lldb-dev
Hi, I came across the formatter example in unicode_strings.py where in utf16_summary() I see this code: string_data = value.process.ReadMemory(pointer, length, error) # utf8 is safe to emit as-is on OSX return '"%s"' % (string_data.decode('utf-16').encode('utf-8')) I am trying to replicate that

[lldb-dev] Displaying custom types in STL containers

2018-03-16 Thread Florin Trofin via lldb-dev
Hello, I have a custom Python formatter for my own string type (a specialization of std::basic_string). It displays fine by itself but when it is inside an STL container (vector, map, etc), I lose the format (shows the default view that lldb uses when you don't have a special formatter). How can I

Re: [lldb-dev] Displaying custom types in STL containers

2018-03-19 Thread Florin Trofin via lldb-dev
t being found as that is a bug. > > > On Mar 16, 2018, at 12:19 AM, Florin Trofin via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > > > Hello, > > > > I have a custom Python formatter for my own string type (a > specialization of std::basic_string). It dis