[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 02:06:40 PDT 2024


================
@@ -373,7 +373,6 @@ void yaml::MappingContextTraits<MemoryDescriptor, yaml::BinaryRef>::mapping(
 void yaml::MappingContextTraits<MemoryDescriptor_64, yaml::BinaryRef>::mapping(
     IO &IO, MemoryDescriptor_64 &Memory, BinaryRef &Content) {
   mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange);
-  mapRequiredHex(IO, "Data Size", Memory.DataSize);
----------------
labath wrote:

I actually think we should provide a way to override the DataSize field, as the main purpose of the yaml is to test the parser with possibly invalid input. It doesn't have to be present by default though, which I think you can achieve by using `IO.mapOptional("Data Size", Memory.DataSize, Content.binary_size());` -- and putting it after the "Content" line.
(I'm not using hex, because the RawContentStream is also printed in decimal, but I could be convinced to change both).

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


More information about the lldb-commits mailing list