This is the mail archive of the gdb@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]

dwarf2read.c: passing objfile as parameter?


While passing parameters in globals Is Bad (tm), is there any reason
to keep passing objfile around instead of storing it in
dwarf2_per_objfile?

E.g. dwarf2_find_containing_comp_unit takes objfile as a parameter:

static struct dwarf2_per_cu_data *
dwarf2_find_containing_comp_unit (unsigned long offset,
				  struct objfile *objfile)

but it also references dwarf2_per_objfile:

  high = dwarf2_per_objfile->n_comp_units - 1;

Is there a reason why objfile isn't recorded in dwarf2_per_objfile?


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