[llvm] r243487 - [tests] Use llvm-readobj instead of macho-dump.

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 21:29:51 PDT 2015


On Thursday, August 13, 2015, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Wed, Aug 12, 2015 at 07:38:53PM -0700, Saleem Abdulrasool via
> llvm-commits wrote:
> > > * Have good error messages. Right now most of the errors are just
> > > "parse error". We can do a lot better by adding a diagnostic handler.
> > > This is in my todo list.
> > >
> >
> > Not to put words in Joerg's mouth, but I think that this would go a long
> > way to alleviate his concern.  If we can provide concrete messages of
> > *what* went wrong, then the tool becomes significantly more invaluable,
> > since it can analyse the failure.
>
> Mostly. Consider a problem I had lately on ARM where the notes where not
> correctly aligned. readelf is parsing it for a lot of operations -- and
> crashed every time. Providing a good error message is a start for
> diagnosing the error. If you see a problem, stop what you are doing
> right now and see where you can safely resume parsing.


This seems reasonable, and I agree that this behavior is preferable.


> We do that quite
> well in clang, we should try to adopt a similar stance when dealing with
> binary formats. There are different options here. For fixed size
> records, continuing with the next record is normally OK. For variable
> size records, depending on the problem bailing out and dealing with a
> different part of the field may be the only option.


Yeah, basically what I was advocating poorly :).

Seems like there is mostly consensus around the desired behavior of the
tool.  Davide, does this sound reasonable to you?


> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150813/add7c990/attachment.html>


More information about the llvm-commits mailing list