This is the mail archive of the gdb-patches@sources.redhat.com 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] Support for multiple DWARF comp unit headers


> compatibility. For instance, an optimization that might be done later is
> to only read necessary DWARF info when needed (this is a technique
> implemented in a debugger I work with), in this case, hanging on the
> abbrev table is a good idea.
> 
> Thanks for your great comments, I'll have the patch split and resent
> this week. I'll also be sending some other smaller patches for support
> of various little DWARF features.

You might save time looking through the mailing list archives.
I've coded most of the features at some time or another, they just 
never made it in for various reasons (some my fault, some others).

> Petr
> 
> Thanks 
> 
> > 
> > Petr Sorfa <petrs@caldera.com> writes:
> > 
> > > Hi,
> > >
> > > Patch for supporting multiple DWARF comp unit headers. This is necessary
> > > for supporting DW_FORM_ref_addr properly when the reference is to a
> > > compilation unit outside of the current one. The current code only
> > > supports one comp unit at a time.
> > >
> > > 2002-07-03 Petr Sorfa (petrs@caldera.com)
> > >
> > >         * dwarf2read.c (build_die_ref): New function that builds
> > >           a new die reference if necessary, will search across
> > >           multiple comp units to find the reference.
> > >           (find_die_ref): New function that searches for a die
> > >           reference for a given comp unit.
> > >           (find_cu_header_from_begin_offset): New function that
> > >           searches through a link list of comp unit headers for
> > >           a comp unit that matches the given offset.
> > >           (register_cu_header): New function that registers a
> > >           comp unit header by allocating space for it and
> > >           adding it to the comp unit header list.
> > >           (free_cu_header_list): New function that frees up the
> > >           memory taken up by the list of comp unit headers
> > >           associated with a process.
> > >           (dwarf_new_init): New function that initializes DWARF
> > >           information for a new process.
> > >           (struct comp_unit_head): Adds several new members
> > >           to contain fully all the comp unit head's info.
> > >           (first_cu_header): A new global variable that points
> > >           to the first comp unit head for the process.
> > >           (cu_header_offset): Global variable removed, as is now
> > >           present in each comp unit head.
> > >           (dwarf_abbrevs): Global variable removed, as is now
> > >           present in each comp unit head.
> > >           (dwarf2_read_abbrevs):
> > >           (dwarf2_empty_abbrev_table):
> > >           (dwarf2_lookup_abbrev):
> > >           (dwarf_attr):
> > >           (die_is_declaration):
> > >           (read_base_type):
> > >           (dwarf2_get_pc_bounds):
> > >           (read_tag_string_type):
> > >           (dwarf2_linkage_name):
> > >           (dwarf2_get_ref_die_offset):
> > >           All of these functions have a new argument added to
> > >           pass the current comp unit header. All calls to these
> > >           functions have been updated to handle the additional
> > >           argument.
> > >
> > >         * elfread.c (elf_new_init): Now calls dwarf_new_init()
> > >           to initialize DWARF related information for the
> > >           new process.? err
> 
> 


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