apple / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Apple’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.1k stars 320 forks source link

[Cherry-pick into next] Produce a summary for non-decodable strings. #8812

Closed adrian-prantl closed 1 month ago

adrian-prantl commented 1 month ago
commit 22968c8d18590bace891738365455102011c0c08
Author: Adrian Prantl <aprantl@apple.com>
Date:   Tue May 28 12:50:50 2024 -0700

    Produce a summary for non-decodable strings.

    Currently when LLDB encounters an uninitialized string the summary
    formatter will fail and the user sees something like:
(String) s = {
  _guts = {
    _object = (_countAndFlagsBits = 18374403900871474942, _object = 0xfefefefefefefefe)
  }
}
```

with this patch this becomes

(String) s = <could not decode string: unexpected discriminator>