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: [0/4] RFC: add DWARF index support


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

Doug> I don't want to unnecessarily delay the patch (given, for example, its
Doug> size), but not generating an index file when asked to and not flagging
Doug> an error feels wrong at a gut level.

For our particular use (RPM builds), we'll just ignore errors anyhow,
because (IMO) it is more important for the build to succeed than for
this optimization to be applied.

There are a few problems here if you want it to work the other way.

First, main.c doesn't play well with errors.  When processing -ex
arguments we just ignore error returns, and then later call quit_force,
which exits with status 0.  I think this makes sense to change, but I
have not thought through all the ramifications, or tried to research the
history.

Second, save_gdb_index_command prints the error but doesn't propagate
it.  Since it loops over all objfiles this seemed nicest.  But, we don't
use it that way from this script; maybe we could add a "-fail" option to
the command or something like that.

I think I will just revert the gdb-add-index.sh addition, since it has
too many problems.  I'll revisit it when I can spend some time fixing up
-batch.  I'll send a reversion patch tomorrow.

Doug> E.g., I wonder what should happen if there isn't enough (or any) info
Doug> to generate .gdb-index.
Doug> Is that an error?

I guess it could be.  I don't really care much about the various
pathological cases.

Doug> I hate to add another wrinkle, and thanks for bearing with me.
Doug> I just tried passing a file that doesn't exist.  gdb writes something
Doug> to stderr and then exits with a zero exit code.
Doug> That needs to be flagged as an error (presumably with test -r or some
Doug> such before invoking gdb) , but it could be deferred to another patch.

This is the main.c problem.  The "file" command fails, but that doesn't
affect operation.

Tom


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