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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 05:50:24 PDT 2015


> I see what's your use case. I think this deserves a little bit more
> discussion, and I would like to hear what Saleem and Rafael have to
> say about it (or others, as well), but what do you think about
> introducing a flag --continue-on-error so that:
> 1) by default, we bail out early and notice immediately to the user
> the object is broken.
> 2) for people who want to investigate and understand what's broken,
> they turn on the flag and get the (potential) garbage printed.
>

I don't think we should have that flag. What I think we should do to
make llvm-readobj well behaved on invalid files is

* Make it read as least as possible. I already did some of that so
that, for example, it doesn't fail on a file with a broken dynamic
table if you are not printing the dynamic table.
* 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.

Cheers,
Rafael


More information about the llvm-commits mailing list