<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68396>68396</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLDB: reference to std::pmr::deque<> incorrectly shows size zero
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ByunghoonKim
</td>
</tr>
</table>
<pre>
Hi,
LLDB does not seem to recognize std::pmr::deque<>. The symptom is identical to what is described in #62153.
Tested on MacBook Pro M1 Pro,
```
lldb-1500.0.22.8
Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
```
```
❯ cat testing.cxx
#include <cstdio>
#include <memory_resource>
#include <deque>
typedef std::pmr::deque<int> int_deq;
int main() {
char buffer[1024];
std::pmr::monotonic_buffer_resource buf{buffer, 1024};
int_deq numbers{&buf};
printf("break here");
(numbers.push_back(1));
printf("break here");
(numbers.push_back(12));
(numbers.push_back(123));
(numbers.push_back(1234));
(numbers.push_back(12345));
(numbers.push_back(123456));
(numbers.push_back(1234567));
numbers.clear();
printf("break here");
return 0;
}
❯ lldb a.out
(lldb) target create "a.out"
Current executable set to '(**blurred**)/a.out' (arm64).
(lldb) breakpoint set --line 14
Breakpoint 1: where = a.out`main + 136 at testing.cxx:14:3, address = 0x0000000100003d38
(lldb) run
Process 56671 launched: '(**blurred**)/a.out' (arm64)
Process 56671 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000100003d38 a.out`main at testing.cxx:14:3
11 printf("break here");
12
13 (numbers.push_back(1));
-> 14 printf("break here");
15
16 (numbers.push_back(12));
17 (numbers.push_back(123));
Target 0: (a.out) stopped.
(lldb) expr numbers
(int_deq) $0 = size=0 {}
(lldb) expr numbers.size()
(std::deque<int, std::pmr::polymorphic_allocator<int> >::size_type) $1 = 1
(lldb)
```
</pre>
<img width="1px" height="1px" al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