llvm / llvm/llvm-project

[lldb][Linux][AIX] 'Summary Unavailable' when inspecting std::string in LLDB on Linux and AIX

Open
#161,175 6 comments 0 reactions 0 assignees View on GitHub
lldb platform:aix platform:linux
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

While debugging C++ programs with LLDB, I'm observing this issue while inspecting std::string objects.
So far I have seen this issue with ppc64le Linux, x86_64 Linux and AIX.

x86_64 Linux:
```
Process 214771 stopped
* thread #1, name = 'test', stop reason = step over
frame #0: 0x0000000000401371 test`main at test.C:13:15
10 Person p("Alice", 30, 1.65);
11 std::string str = "Hello";
12 // ...
-> 13 std::cout << "string " << str << std::endl;
14
15 return 0;
16
(lldb) p str
(std::string) error: summary string parsing error
```
ppc64le Linux:
```
(lldb) n
Process 7131 stopped
* thread #1, name = 'test', stop reason = step over
frame #0: 0x00000000100105fc test`main at test.C:13:15
10 Person p("Alice", 30, 1.65);
11 std::string str = "Hello";
12 // ...
-> 13 std::cout << "string " << str << std::endl;
14
15 return 0;
16
(lldb) p str
(std::string) Summary Unavailable
```

AIX:
```
(lldb) n
Process 27656672 stopped
* thread #1, name = 'test', stop reason = step over
frame #0: 0x0000000100000990 test`main at test.C:13
10 Person p("Alice", 30, 1.65);
11 std::string str = "Hello";
12 // ...
-> 13 std::cout << "string " << str << std::endl;
14
15 return 0;
16
(lldb) p str
(std::__1::string) Summary Unavailable
```
LLDB falls back to the 'summary unavailable' as LLDB's pretty printer is not able to resolve the std::string from the used libc++.
Is this an already known issue on Linux?
Please let me know your plans/suggestions on this, and I can work on a fix with your feedback.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the std::string inspection failures with the test.C examples on x86_64 Linux, ppc64le Linux, and AIX. Inspect LLDB's pretty-printer handling for the used libc++; done means LLDB displays the string summary instead of reporting a parsing error or “Summary Unavailable” on the affected platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.