Add more error checking to llvm-objdump and MachODump

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 16:50:21 PST 2015


Hi Rafael,

"But it is important to stress that we are not the common case. We should
not make objdump harder to maintain because a handful of developers
sometimes find it useful to see more than one error printed on a file they
just created."

No comment on the rest of the patch (I haven't read it), but regarding
error handling schemes I'm not sure I understand the objection. Most users
would be unaffected by any change in error handling since errors in objects
files are uncommon. Some users care a lot, but they're the same people
volunteering to do the development and maintenance (e.g. Kevin and Pete).
The changes shouldn't place undue burden on anyone else.

If it's a matter of avoiding polluting ELF and COFF with error schemes that
you don't want to maintain, maybe we can confine the richer error-checking
to the mach-o specific parts, and have the top-level mach-o specific
function error out with fatal_error if any errors are reported.

Cheers,
Lang.


On Mon, Dec 14, 2015 at 3:29 PM, Rafael EspĂ­ndola <
llvm-commits at lists.llvm.org> wrote:

> > For me it is extremely common to see broken .o files and that is what I
> do for a living.  And I write these tools for me to do my job.  If others
> find them useful great!  But they are needed to look at good and bad .o
> files.
> >
>
> I see files like that for the same reason. But it is important to
> stress that we are not the common case. We should not make objdump
> harder to maintain because a handful of developers sometimes find it
> useful to see more than one error printed on a file they just created.
>
> And given the option of multiple errors with a good chance of only the
> first one being relevant or a single error that is far easier to put a
> breakpoint on I would always take the single error.
>
> Cheers,
> Rafael
> _______________________________________________
> 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/20151214/ee87a4b6/attachment.html>


More information about the llvm-commits mailing list