[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)

Jonathan Wakely via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 4 07:21:33 PST 2024


================
@@ -231,7 +199,7 @@ def __init__(self, val):
 
     def to_string(self):
         """Build a python string from the data whether stored inline or separately."""
-        value_field = _value_of_pair_first(self.val["__r_"])
+        value_field = self.val["__rep_"]
----------------
jwakely wrote:

Actually no, it doesn't seem to work. I think you need the `printers.py` sourced and the `register_libcxx_printer_loader` function called before running the process. If printing the type fails, I don't think you can load a different printer later (at least, it doesn't work for me).

So you need to know which printers you're going to want to use before you start debugging the process and pick the right ones.

It seems more likely that users will get the following error and just shrug and assume it doesn't just work :)

`Python Exception <class 'gdb.error'>: There is no member or method named __size_.`

https://github.com/llvm/llvm-project/pull/76756


More information about the libcxx-commits mailing list