This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH 3/3] move the "main" data into the per-BFD object


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> Seems like there ought to be an invariant that there is only one
Doug> main name.  I ask because it's not clear this invariant is
Doug> enforced (or if it is it's too subtle) and thus what if this loop
Doug> finds the wrong one?

I agree there's some room for improvement, but I don't think this series
makes the code worse in any notable way.  There is no such invariant
today and I don't know how it would be enforced.  I think the new code,
if anything, is slightly more likely to get the correct answer, due to
walking the objfiles in load order, rather than reverse order.  For the
DWARF reader at least this only even triggers for Fortran anyway (gdb
doesn't handle DW_AT_main_subprogram yet), which I think implies a lower
exposure to possible difficulties.

Tom


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