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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 02:22:37 PDT 2015


On Fri, Aug 14, 2015 at 12:29 AM, Saleem Abdulrasool via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> 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?
>

Yes, I like this proposal much more than my original idea. I hope I
can devote some time to this in the future.

Thanks,

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list