[PATCH] D139750: Optionally print symbolizer markup backtraces.
Daniel Thornburgh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 16:45:32 PST 2023
mysterymath added inline comments.
================
Comment at: llvm/lib/Support/Unix/Signals.inc:538
+ OS << format("{{{mmap:%#016x:%#x:load:%d:%s:%#016x}}}\n", StartAddress,
+ Phdr->p_memsz, ModuleCount, (char *)ModeStr,
+ ModuleRelativeAddress);
----------------
phosek wrote:
> Can you use `reinterpret_cast` instead of C-style cast?
This is just an array to pointer decay, so `static_cast` works. format just doesn't like being handed an array type.
================
Comment at: llvm/lib/Support/Unix/Signals.inc:561
+ ArrayRef<uint8_t> Notes(
+ (const uint8_t *)(Info->dlpi_addr + Phdr->p_vaddr), Phdr->p_memsz);
+ while (Notes.size() > 12) {
----------------
phosek wrote:
> Can you use C++-style instead of C-style cast here and below?
Done, throughout.
================
Comment at: llvm/lib/Support/Unix/Signals.inc:571
+ ArrayRef<uint8_t> Name = Notes.take_front(NameSize);
+ uint32_t AmtToSkip =
+ alignToPowerOf2((uintptr_t)Notes.data() + NameSize, 4) -
----------------
phosek wrote:
> What does `Amt` refer to? Might be better to use something more self-descriptive.
Renamed these as the bytes remaining until the next item.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139750/new/
https://reviews.llvm.org/D139750
More information about the llvm-commits
mailing list