labath wrote:

Regarding the vector summary example, it looks like that there's still a lot of 
room for improvement there. This is what I get before this patch:
```
(lldb) v v vp vr vpr &v &vp &vr &vpr
(std::vector<int>) v = size=2 {
  [0] = 0
  [1] = 0
}
(std::vector<int> *) vp = 0x00007fffffffd7b0 size=2
(std::vector<int> &) vr = size=2: {
  [0] = 0
  [1] = 0
}
(std::vector<int> *&) vpr = size=1: {
  &vpr = 0x00007fffffffd7b0 size=2
}
(std::vector<int> *) &v = 0x00007fffffffd7b0 size=2
(std::vector<int> **) &vp = 0x00007fffffffd7a0 size=1
(std::vector<int> &*) &vr = 0x00007fffffffd790 size=1
(std::vector<int> *&*) &vpr = 0x00007fffffffd788 size=1
```

And this comes after it:
```
(lldb) v v vp vr vpr &v &vp &vr &vpr
(std::vector<int>) v = size=2 {
  [0] = 0
  [1] = 0
}
(std::vector<int> *) vp = 0x00007fffffffd7b0 size=2
(std::vector<int> &) vr = size=2: {
  [0] = 0
  [1] = 0
}
(std::vector<int> *&) vpr = size=1: {
  &vpr = 0x00007fffffffd7b0 size=2
}
(std::vector<int> *) &v = 0x00007fffffffd7b0 size=2
(std::vector<int> **) &vp = 0x00007fffffffd7a0 size=1
(std::vector<int> *) &&vr = 0x00007fffffffd7b0 size=2
(std::vector<int> **) &&vpr = 0x00007fffffffd7a0 size=1
```

The output for `&vr` changes (for the better, I guess), but `vpr`, `&vp` and 
`&vpr` are still extremely dubios, so if you want to tackle this issue 
seriously, then we also need to discuss what should the data formatters/summary 
providers do when faced with nested pointers and references.

https://github.com/llvm/llvm-project/pull/113596
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to