[PATCH] D53379: GSYM symbolication format
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 26 15:26:19 PDT 2018
zturner added inline comments.
================
Comment at: include/llvm/DebugInfo/GSYM/GsymReader.h:46
+struct Header {
+ uint32_t Magic;
+ uint16_t Version;
----------------
clayborg wrote:
> With the switch to using BinaryStreamReader this might just work now if I understand the class directly. I switched over to decoding ArrayRefs for AddrOffsets, AddrInfoOffsets and FileEntry in the GsymReader. So this format can be any endian if needed. BinaryStreamReader would make a copy and swap them right?
I'm not sure I understand the question about making a copy and swapping. `BinaryStreamReader` never makes a copy of anything (that's one of the nice things about it actually). So you'd say something like:
```
const Header *Header = nullptr;
BinaryStreamReader Reader(Stream);
Reader.readObject(Header);
```
Note that header was never declared as an object to begin with, just a pointer. So no copy ever happened. All that happened was it changed the value of your pointer to point into the buffer.
Does that answer your question?
https://reviews.llvm.org/D53379
More information about the llvm-commits
mailing list