Moved a couple functions between source files
and made them static. A couple commentary changes.
print_frames.c, though, needed hardening against
corrupt frame data.
dwarfdump/globals.h
dwarfdump/print_aranges.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_sections.c
All data reads from an object ensure the
read is actually in a section.
It is always possible something was overlooked, but
all the reading macros and functions now do checks.
libdwarf/dwarf_arange.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_errmsg_list.c
libdwarf/dwarf_form.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_global.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_loc2.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_print_lines.c
libdwarf/dwarf_query.c
libdwarf/dwarf_ranges.c
libdwarf/dwarf_util.c
libdwarf/dwarf_util.h
libdwarf/dwarf_xu_index.c
libdwarf/libdwarf.h.in
* print_abbrevs.c(dwarf_get_array_info): Initialize local variable.
* print_die.c(get_location_list): Initialize local variable.:
* dwarf_loc.h: Add declaration of _dwarf_loc_block_sanity_check().
* dwarf_loc.c: Call new function _dwarf_loc_block_sanity_check
* dwarf_loc2.c: Implement and call new function
_dwarf_loc_block_sanity_check to avoid duplicating code.
libdwarf
* dwarf_opaque.h: Delete two useless blank lines.
* dwarfdump.c: Revised -g so it no longer turns on -i.
Revised the meaning of -g to mean use old loclist interfaces
(for testing the older interfaces with dwarfdump).
* print_die.c(get_small_encoding_integer_and_name): a dwarf_dealloc
referenced err whereas *err was correct.
Revised loclist output making it look a bit like DWARF5
even for DWARF2,3,4 output. Reads better, I think.
* print_locs.c: -l gets a 'no longer supported' message
dwarfdump/dwarfdump.1
dwarfdump/dwarfdump.c
dwarfdump/print_die.c
dwarfdump/print_locs.c
* dwarf_alloc.c: Added new checks so user mixing up
tied dbg with regular dbg won't lead to crashes
when calling dwarf_dealloc or dwarf_finish().
Zeroed out some fields to recognize space deallocated.
* dwarf_die_deliv.c: Added support of split dwarf
DW_AT_[GNU_]ranges_base
* dwarf_form.c: Load string from tieddbg when appropriate.
* dwarf_harmless.c: On free() zero out a field to show that was done.
* dwarf_loc.c: Correct the handling of split dwarf loclist.
* dwarf_opaque.h: Add cc_ranges_base_present for split dwarf.
Add _dwarf_get_ranges_base_attr_from_tied() for split dwarf.
* dwarf_query.c: Get and remember skeleton compilaton unit
DW_AT_[GNU_]ranges_base from tied objects for split dwarf.
* dwarf_ranges.c: If a tied object present, look for ranges
there, not in split dwarf object.
* dwarf_util.c: Housekeeping zeros out fields to ensure not
used after dealloc.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_form.c
libdwarf/dwarf_harmless.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_loc2.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_query.c
libdwarf/dwarf_ranges.c
libdwarf/dwarf_util.c
reader.
Add a new configure option --enable-wall (regenerate configure).
Revise the interfaces for the not-implemented new
location expression and loclist interfaces.
dwarfdump/print_die.c
libdwarf/Makefile.in
libdwarf/configure
libdwarf/configure.in
libdwarf/dwarf_error.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_loc.h
libdwarf/libdwarf.h.in
examples.c: Add commentary to example9.
dwarf_alloc.c: Add DW_DLA_LOC_BLOCK_C and DW_CLA_LOCDESC_C
allocation descriptions to array.
dwarf_alloc.h: Increase ALLOC_AREA_INDEX_TABLE_MAX to match.
dwarf_base_types.h: Increase MAX_DW_DLA to match.
dwarf_die_deliv.c: Switch some returns from pointer to
the standard int DW_DLV_OK etc and return pointer through
an argument. Identify which CUs are dwo by checking name
for a .dwo ending. Fix whitespace endings.
dwarf_error.c: Add DW_DLE 309 to 311 errors to descriptions array.
dwarf_form.c: Remove trailing whitespace. Reformat one line
so it is not so long.
dwarf_line.c: Add {} on if for clarity.
Fix whitespace endings.
dwarf_line_table_reader.c: Fix whitespace endings.
dwarf_loc.c: Refactor loc. expr. reader into a
routine that reads one expression, _darf_read_loc_expr_op()..
Add DWARF5 operators.
Add preliminary dwo expression support (which will change
but this is a start). Old expression interface now
explicitly supports only DWARF 2,3,4. No DWARF5.
Add preliminary loclist_c support (it will change).
Add commentary about the old loclist interface.
dwarf_loc.h: First cut of new interfaces (functional, not
public structs).
dwarf_opaque.h: Add cc_is_dwo flag to cu context struct.
libdwarf.h.in: Rework some loclist commentary.
Add first try at new loclist interfaces for DWARF2,3,4,5.
New error codes for new loclist/dwo code.
libdwarf2.1.mm: Rev 2.32. New wording on old loclist
interfaces.
DW_CIE_VERSION* DW_CU_VERSION**
DW_ARANGES_VERSION* DW_LINE_VERSION* DW_LOC_VERSION*
DW_LINE_STR_VERSION5, DW_MACRO_VERSION5,
DW_LINE_LOC, DW_NAMES_VERSION5, DW_PUBNAMES_VERSION*,
DW_PUBTYPES_VERSION*, DW_STR_OFFSETS_VERSION5,
DW_SUP_VERSION*, DW_CU_INDEX_VERSION5
exclusively. Deleting the CURRENT_VERSION_STAMP* macros.
The intent is to improve readability given we now have
4 versions of DWARF to deal with.
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
Here we fix some warnings.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_alloc.h
libdwarf/dwarf_gdbindex.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_query.c
libdwarf/dwarf_sort_line.c
Here we fix some warnings.
libdwarf/dwarf_tsearchhash.c
tsearch/dwarf_tsearchhash.c
Here we fix some warnings
libdwarf/dwarf_util.c
libdwarf/libdwarf.h.in
libdwarf/pro_alloc.c
libdwarf/pro_arange.c
libdwarf/pro_forms.c
libdwarf/pro_reloc.c
libdwarf/pro_types.c
dwarf_print_lines.c,dwarf_macro.c: Remove trailing whitespace.
dwarf_ranges.c, dwarf_sort_lines.c: Remove trailing whitespace.
dwarf_query.c, dwarf_pubtypes.c: Remove trailing whitespace.
dwarf_original_elf_init.c,dwarf_loc.c: Remove trailing whitespace.
gennames.c: Fix a printf so the generated dwarf_names.c
does not have a trailing space.
to an error dumping modern gcc output, such as the Fedora 18
debug libc. Fixing this required changing the public struct Dwarf_Loc
and some related data inside libdwarf.
Making this change does introduce the sort of inconsistency
meaning the new libdwarf cannot be used to access location
data without
recompiling callers.
This incorporates improvements to the checking
and new options. For dwarfdump and dwarfdump2.
It makes formatting of if/for/while more
consistent across the source.
It removes many double-quote characters around strings that
turned out not to be as useful (in the dwarfdump output)
as had been thought.
It adds the ability to handle additional relocations
so more relocatable objects can be handled by libdwarf.
libdwarf.h
libdwarf2.1.mm
libdwarf2.1.pdf
DW_OP_GNU_implicit_pointer requires a version stamp
to work correctly. Created a new function
to allow clients to expicitly pass the version stamp.
Most clients can continue to use the old interface.
change to make consistent use of 'if', 'for' and 'while'.
===================
dwarfdump.c lines 73-78 Any time an 'extern foo' appears in a .c or a .cc
file it represents a current or future error that cannot be easily detected
at compile time. Bad.
Instead, put print_attributes_encoding and current_cu_die_for_print_frames
declarations into appropriate .h files (possibly new one or ones?) and
include the header in each .c/.cc where it is needed. That prevents future
spelling errors from causing mysterious runtime failures due to argument
errors: the compiler will catch argument errors.
Now line 56-58 is special in that it refers to some windows thing, not
defined in dwarfdump. So that one perhaps should or must stay as written.
===================
dwarfdump.c line 549: the variable 'bitmap' should be named something else.
bitmap is just too generic, not helpful to the reader. Easier for a
reviewer to see this sort of issue than the author :-)
Possibly local_section_bitmap? Somehow get 'section' in there in that
function-argument-name?
=======
dwarfdump.c: good catch on the indent errors in qsort_compare_compiler(),
I have no idea how I failed to run dicheck on that.
======
dwarfdump.c line 1043. The 'Just for the moment' comment is odd. What
does that mean? Why 'for the moment'? I am not going to try to guess
why you did that, but it has to be somehow wrong?
Either the code or the comment?
========
dwarfdump.c line 1162. The comment says do not do reloc_flag = TRUE
yet you added exactly that! Yikes! I don't know what to do about
this, but something has to change. Comment or statement. Can we detect
non-elf somehow? We probably already do, but...
===================
dwarfdump.c line 1630. Oops. Good catch on removing the mistaken extra
break;
* dwarf_arange.c,dwarf_elf_access.c, dwarf_frame3.c,
dwarf_funcs.c,dwarf_global.c,dwarf_init_finish.c,
dwarf_line.c,dwarf_loc.c,dwarf_macro.c,dwarf_print_lines.c,
dwarf_pubtypes.c,dwarf_query.c,dwarf_ranges.c,dwarf_string.c,
dwarf_types.c,dwarf_vars.c, dwarf_weaks.c: Everything loading
a section now checks the result for 'empty' and returns
DW_DLV_NO_ENTRY explicitly. This makes it easier to
do nothing safely when there is no data.
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.