This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfa] eliminate some annoying mdebug-related symtab crashes



Daniel Jacobowitz <dmj+@andrew.cmu.edu> writes:
> The include files fix here is indeed for the same problem as in the
> other patch.  I didn't withdraw the first patch because it seemed best
> to me to fix it in both places - initialize properly, and don't die if
> we didn't.  Defensive programming; I'm sick of GDB crashing on the
> (admittedly somewhat bizarre) binaries I've been giving it.

I'm not following along in the code, but isn't it best to:
1) initialize things properly, and then
2) report an internal error if we later find that things weren't 
   initialized properly
?

Handling internal failures silently is a bad thing.  If you complain,
you know you've found a bug, and you can go fix it at the source.
Changing code downstream (in the sense of data flow) to silently
tolerate bad data from upstream is like throwing away bug reports.

Of course, if the buggy source is another program over which we have
no influence (like a vendor's compiler), the story is different.
There, I think the "be tolerant in what you accept, and strict in what
you send" rule applies.

Again, I'm not following the specifics here, so I apologize if this
isn't really germaine.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]