[PATCH] D92081: [libObject,llvm-readelf] - Stop describing a section/segment in `notes_begin()`.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 01:23:25 PST 2020

jhenderson added a comment.

Just to rephrase your initial description to make sure I understand, the reason we can't rely on the `notes_begin` method to report the context itself is because not all errors that `notes_begin` could ultimately report have the information needed to provide this context, right? And because of this, we need the context to be added at a higher level, right?

Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5591
+      reportError(
+          createError("unable to read notes from the PT_NOTE segment: " +
+                      toString(std::move(Err))),
There could be more than one PT_NOTE segment, so perhaps this should also say something about the segment's index or other identifying property, so that it can be clearly identified. What do you think?



More information about the llvm-commits mailing list