standard tables: header says lno now,
for line number (row was incorrect).
dwarfdump/dwarfdump.c
dwarfdump/print_die.c
dwarfdump/print_lines.c
New checks for correctness and section overrun.
Fixed duplicate free due to bug in DWARF5 macro
handling.
libdwarf/dwarf_arange.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_elf_access.c
libdwarf/dwarf_errmsg_list.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_leb.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_util.h
libdwarf/libdwarf.h.in
dwarfdump/dwarfdump.c
Ensure dependency on dwarf_errmsg_list.c
libdwarf/Makefile.in
Do much much more testing to ensure we do not
run off the end of section or accept a bogus
leb number.
libdwarf/dwarf_abbrev.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_errmsg_list.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame.h
libdwarf/dwarf_frame2.c
libdwarf/dwarf_frame3.c
libdwarf/dwarf_leb.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_query.c
libdwarf/dwarf_util.c
libdwarf/dwarf_util.h
libdwarf/libdwarf.h.in
* dwarfdump.c: Add enum line_flag_type_e so we can test
all the srclines interfaces (4 of them). Expand -x
for that too.
* print_die.c: Support DW_FORM_GNU_strp_alt.
* print_lines.c: Update for old and new srclines
interfaces.
* globals.h: Added the enum line_flag_e variable for
recording -x line5= value.
libdwarf
* checkexamples.c: Fixed data type in the example code.
* dwarf.h: Updated comment about DW_FORM_GNU_strp_alt
* dwarf_elf_access.c: Fixed trailing whitespace and
removed debug printf that got left in.
* dwarf_error.c: Add new TIED file errors.
DW_DLE_NO_TIED_FILE_AVAILABLE, DW_DLE_NO_TIED_STRING_AVAILABLE.
* dwarf_form.c: Added support for DW_FORM_GNU_strp_alt.
* dwarf_init_finish.c: #if 0 routine all_sig8bits_zero().
* dwarf_line.c: Now always notice windows-like c: etc
as start of a full path. Ensure directories with \ are
turned to / in line tables. (for full such transforms
configure with --enable-windowspath ) Remove some debug #ifdef
lines.
Alter the linecontext interface to pass back table count,
not linecount.
* dwarf_line.h: Add commentary and lc_table_count field.
* dwarf_line_table_reader_common.c: Fix indent/trailing whitespace.
Now sets lc_table_count;
* dwarf_opaque.h: Add _dwarf_get_string_from_tied() interface.
* dwarf_print_lines.c: Remove trailing whitespace and some debug printf..
* libdwarf.h.in: New error codes. Fix trailing whitespace. Expand
commentary.
Makefile.in: Removed source files from the build that
are only useful to IRIX and only in the context of building
an IRIX runtime system.
dwarf_alloc.c: Added constructor/destructor code to
Dwarf_Line_Context allocator.
dwarf_elf_access.c: Added additional #defines so we
have the IA64 defines we need to compile certain
test cases on freebsd.
dwarf_error.c: Two new error codes for Dwarf_Line_Context
checking.
dwarf_line_table_reader_common.c: New file. We can compile
the line reading with and without detailed print lines
for dwarfdump. Now only one body of line reading code
to maintain.
dwarf_line.c: Moved code out to dwarf_line_table_reader_common.c
Refactored to support skeleton line tables (DWARF5)
Eliminated an internal struct, it is no longer needed.
a little better.
Supports experimental two-level line tables too.
dwarf_print_lines.c: Uses dwarf_line_table_reader_common.c
to do much of its work now.
libdwarf.h.in: New interfaces for nicer access to
line table headers.
libdwarf2.1.mm: Partial documentation of the new
libdwarf line table interfaces.
dwarf_global.c,dwarf_line.c,dwarf_line.h,dwarf_line2.c,
dwarf_line_table_reader_common.c,dwarf_sort_line.c,libdwarf.h.in:
The SGI IRIX only fields in dwarf_line.h ifdef __sgi now.
And all code referencing them that way too. Balancing
#endif has /* __sgi */ now for searchability.
Functions only usable on SGI IRIX only compiled in if __sgi
macro defined.
libdwarf2.1.mm: Added a comment related to experimental
two-level line tables.
So code can be added there to print more
and better information on the header.
libdwarf:
dwarf_line.c
dwarf_line.h
dwarf_line_table_reader_common.c
dwarf_print_lines.c
Fixed indent and trailing whitespace. Fixed the 'section offset'
code by using the proper value from dss_data..
libdwarf:
dwarf_line.c
dwarf_line.h
dwarf_line2.c
dwarf_line_table_reader_common.c
dwarf_print_lines.c
libdwarf.h.in
line register structs agree on spelling of suffix of each name.
Now dwarf_srclines (and two-level) use the
line register struct instead of a list of local variables.
This in preparation for a revamp of dwarf_print lines
and a simplification of dwarf_print_lines.
dwarfdump/dwarfdump.c update date string
dwarfdump/print_lines.c IA is really IS.
libdwarf/dwarf_elf_access.c: Added ifdef/define/endif for relocation types
for better test coverage in FreeBSD and Ubuntu. That is, let it
relocate objects without quite the required relocation names on
the libdwarf/dwarfdump build system.
libdwarf/dwarf_line.c Fixed errors and omissions.
libdwarf/dwarf_line.h
dwarfdump/print_lines.c
Corrected indentation and an error introduced a couple
days ago in computing the end of the line table for a CU.
libdwarf/dwarf.h
libdwarf/dwarf_elf_access.c
libdwarf/dwarf_form.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
and added a Dwarf_CU_Context argument so we can get address
size and segment size when not in the line table.
All this related to two-level line tables.
dwarfdump/print_lines.c
libdwarf/dwarf.h
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_opaque.h
libdwarf/dwarf_print_lines.c
libdwarf/dwarf_sort_line.c
libdwarf/libdwarf.h.in
(not complete) of two-level line tables,
and experiment in line table design.
dwarfdump/ChangeLog
dwarfdump/print_lines.c
libdwarf/ChangeLog
libdwarf/dwarf.h
libdwarf/dwarf_alloc.c
libdwarf/dwarf_base_types.h
libdwarf/dwarf_init_finish.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_line2.c
libdwarf/dwarf_util.c
libdwarf/libdwarf.h.in
* master: (97 commits)
3 one-line fixes, removing three compiler warnings.
dwarfdump/print_gdbindex.c: Fixed indents of a comment.
Update dwarfdump[2] version strings.
Here we fix some warnings and get gdbindex to print better. And get some section names to come out exactly right (but not all, yet). dwarfdump/dwarfdump.1 dwarfdump/dwarfdump.c dwarfdump/print_gdbindex.c dwarfdump2/dwarfdump.1 dwarfdump2/dwarfdump.cc dwarfdump2/print_debugfission.cc dwarfdump2/print_die.cc dwarfdump2/print_gdbindex.cc
dwarfdump, dwarfdump2: Now both print the gdbindex and .debug_[tc]u_index sections.
Dwarfdump: Now we use the new gdbindex and debugfission section-name strings instead of hard coding Elf section names.
libdwarf: minor correction addeing section name to one function and now documents the new gdbindx and debug fission (DWP) interfaces.
libdwarf has a new interface: dwarf_get_die_section_name() so clients can get the object section names (of .debug_info of .debug_types or the same with .dwo names). Fixed indent and trailing whitespace a couple places too.
libdwarf/dwarf_opaque.h: One new comment had a bad indent. Fixed.
libdwarf/dwarf_opaque.h: Clarified the meaning of various CU context struct fields by adding comments.
libdwarf/dwarf_opaque.h: Altered a couple comments to make them clearer.
Now -I now prints the entire .debug_cu_index and .debug_tu_index sections.
Refine that same comment again. It was actually wrong before, not just hard to read. the *next_cu* functions in libdwarf dwarf_die_deliv.c return -1 (DW_DLV_NO_ENTRY), not 0, when we have gotten through all the CUs in a section.
Clarify a comment in dwarf_die_deliv.c.
Fixed the libdwarf ChangeLog. Minor typo in a just-commited entry.
Now we can print the hash table data from the .debug_tu_index and .debug_cu_index sections ( debug fission, the .dwp object file index data).
Removed some newly introduced trailing whitespace characters.
libdwarf and dwarfdump now begin to support the DWARF5 sections .debug_tu_index and .debug_cu_index.
libdwarf: dwarf_arange.c(dwarf_get_aranges_list): Remove the length variable as its calculated value is unused. rename length to area_length for clarity. Calculate arange_ptr_past_end early and correctly. Ensure that the test for version 4 is a >= to reflect normal standards upgrades. dwarf_die_deliv.c(dwarf_find_offdie_CU_Context): Add commentary about offsets and lengths for clarity. Rename fields for clarity about local vs global offset. Use the newly named fields for precise tests of section overflow of a type unit. Other changes in libdwarf were additions and modifications of commentary.
Fixes a mistake in checking a offset in dwarf_die_deliv.c The mistake resulted in an error-return on a really really short .debug_types section where there was no error.
...
Conflicts:
dwarfdump/dwarfdump.c
libdwarf/dwarf_elf_access.c
# By David Anderson
# Via David Anderson
* master:
Now dwarf_print_lines() works via callback instead of using stdout directly. dwarfdump[2] use this new feature now. The new interfaces in libdwarf.h to support this are documented. Some minor botches in libdwarf2.1.mm (bad formatting) fixed.
dwarfdump[2]: commentary and indenting fixes (very few). dwarfexample: Adds a --check option to show in detail when the DW_AT_high_pc is a constant vs offset, at least for subprograms. dwarfgen: Now handles class constant (writes to output) and fixes missing handling of DW_FORM_data4/8 in global references. Adds -h option telling dwarfgen to alter a high pc from address class to const class (and adjusts the value appropriately). So we can create testcases without having a too-recent compiler. libdwarf: Fix an error no one should ever see (programmer failed to run a simple test!) so it returns DW_DLV_ERROR in case it happens. Add dwarf_highpc_b() function to consumer code. dwarf_add_AT_any_value_sleb() and dwarf_add_AT_any_value_uleb() to producer code. Update libdwarf2.1.mm and libdwarf2p.1.mm to reflect the new functions.
Fix non-fatal dwarf_alloc.c to use stdout, not stderr. (debugging warn). Rename misnamed variable in dwarf_init_finish.c and fix documentation on dwarf_set_stringcheck() to be correct. Going along with correction to misnamed variable. No real change to what the code does.
Change intended to handle FORM_string in debug_types. libdwarf/dwarf_form.c
Removed duplicate call to get_scndata() from print_reloc.c
Moves all but fatal messages to stdout/cout, a very few basic fatal errors in dwarfdump come out on stderr/cerr. removed duplicated source line (print_reloc.cc). updated version strings.
Conflicts:
dwarfdump/dwarfdump.c
libdwarf/dwarf_alloc.c
libdwarf/dwarf_line.c
libdwarf/dwarf_opaque.h
stdout directly.
dwarfdump[2] use this new feature now.
The new interfaces in libdwarf.h to support this are documented.
Some minor botches in libdwarf2.1.mm (bad formatting) fixed.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump2/common.cc
dwarfdump2/dwarfdump.cc
Thanks to Carlos Alberto Enciso for the following:
Add const to remove compiler warnings.
dwarfdump/print_reloc.c
A couple more places now match our if style, somehow
not noticed earlier.
libdwarf/dwarf_line.h
Under Windows, the MS compiler generates the following warning message:
print_reloc.c(xxx) : warning C4090: '=' : different 'const' qualifiers
where xxx: lines 155, 162, 169, 176, 183
----
Minor issues with layout for 'if' statements in dwarf_line.h
changes were somehow lost. libdwarf/dwarf_line.h
libdwarf/pro_init.c. Fixing those 4 places with
this commit. Considering that part of the previous
libdwarf/ChangeLog, so no new ChangeLog entry.
* dwarf.h: Added some GNU extensions.
* libdwarf.h: Added dwarf_lineoff_b() as
dwarf_lineoff() wrongly returns a signed column number.
Added dwarf_add_lineentry_b() as preparation for creating
DWARF3/4 output.
* dwarf_line.h: Added new struct fields to accomodate
DWARF3/4 isa and discriminator fields.
* dwarf_line.c: Now deals with the VLIW line calculations
in DWARF4. Adds support for computing the discriminator
and isa fields. Adds dwarf_lineoff_b() (and dwarf_lineoff
is now deprecated). Adds dwarf_prologue_end_etc() which
returns some DWARF3/4 line fields.
* dwarf_print_lines.c: Adds handling of DWARF3/4
line operations and fields and prints the details.
* libdwarf2.1.mm: Documents the new functions in dwarf_line.c
Version set to 2.02.
* libdwarf2.1.pdf: Regenerated.
* libdwarf2p.1.mm: Documents the new function
dwaf_add_line_entry_b().
Version set to 1.32.
* libdwarf2p.1.pdf: Regenerated.
* pro_incl.h: Add parentheses so the WRITE_UNALIGNED macro
works correctly in all circumtances.
* pro_opaque.h: Add DEBUG_RANGES and dEBUG_TYPES to the list
of sections we could generate. Define struct Dwarf_P_Line_Inits_s
to hold initialization values for line table data so we can later
make the choices at runtime rather than compile time.
The new struct is a field of the Dwarf_P_Debug struct.
* pro_line.h: Added some DWARF3/4 support and preparations
for emitting DWARF3/4.
* pro_line.c: Define dwarf_add_line_entry_b() for DWARF3/4
line fields, and _dwarf_init_default_line_header_vals()
to provide a default set of values, the defaults match
what was previously done.
Add support for the new DWARF3/4 line table fields.
* pro_section.c: Add the beginnings of support for creating
new DWARF3/4 sections and the new standard opcodes.
Move the field-writing code to small functions making
the line table writing smaller and easier to read.
Added the beginnings of allowing writing DWARF3/4
line table fields. Some if() missing {} were
modified by adding {} to avoid future problems.
indentation. No interfaces changed. One new and
not very significant (to most people) interface added which
returns a count of abbreviations in an abbreviation section.
Copyrights updated for 2011.