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] Code cleanup: objfile->name is never NULL


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> there is some FUD in GDB code whether objfile->name can be NULL.  I
Jan> haven't found a way it could be.  Also a lot of GDB code already
Jan> assumes it is not NULL.

I agree with this patch.

Jan> -  if (!objfile->name)
Jan> -    return;
 
Jan>    load_auto_scripts_for_objfile (objfile);

This part made me realize that we should probably have some kind of "is
a file" flag on the objfile, to avoid trying to load files relative to a
phony name like "<<anonymous objfile>>".

Tom


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