This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Support more than 1 comp unit


On Tue, Jan 11, 2005 at 08:58:45PM -0500, Daniel Jacobowitz wrote:
> On Tue, Jan 11, 2005 at 05:50:43PM -0800, H. J. Lu wrote:
> > _bfd_dwarf2_find_nearest_line doesn't support more than one comp unit.
> 
> That's obviously not true.  Could you be a little more specific about
> what the problem is that you are trying to solve?
> 

dwarf2_debug has

  /* Preserve the original value of info_ptr for the current
     comp_unit so we can find a given entry by its reference. */
  char* info_ptr_unit;

which is used by find_abstract_instance_name:

	info_ptr = unit->stash->info_ptr_unit + die_ref;

The problem is there is only one info_ptr_unit per file for multiple
CUs. To work with more than one CU, info_ptr_unit has to be updated
for the current CU when find_abstract_instance_name is called. My
patch adds the CU offset to comp_unit, which can be used by
find_abstract_instance_name to adjust info_ptr_unit.

BTW, I have a testcase of a several MB ia64 libc_pic.os generated by
"ld -r".


H.J.


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