Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* dwarf2read.c: passing objfile as parameter?
@ 2008-09-12  6:02 Doug Evans
  2008-09-12 15:56 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2008-09-12  6:02 UTC (permalink / raw)
  To: gdb

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?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-12 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-12  6:02 dwarf2read.c: passing objfile as parameter? Doug Evans
2008-09-12 15:56 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox