Commit Graph

18 Commits

Author SHA1 Message Date
David Anderson
63633bc14a All currently known vulnerabilities fixed.
bugxml/data.txt

Fix indents, remove trailing whitespace.
   dwarfdump/print_abbrevs.c
   dwarfdump/print_aranges.c
   dwarfdump/print_frames.c
   dwarfdump/print_sections.c

Ensure we check dwarf functtion status return.
These sources used only at build time.
   dwarfdump/tag_attr.c
   dwarfdump/tag_tree.c
2016-05-12 10:50:44 -07:00
David Anderson
82d8e00785 bugxml/data.txt
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
2016-05-12 07:39:36 -07:00
David Anderson
86a5812582 dwarfdump/dwarfdump.c
dwarfdump/globals.h
dwarfdump/print_aranges.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_lines.c
dwarfdump/print_macro.c
dwarfdump/print_pubnames.c
      print_lines.c,print_macro.c,print_pubnames.c:
      Remove the global dieprint_cu_offset, use local vars and pass around instead.
      Ensure the traverse() logic when checking type references do not evaluate
      references to other sections. Many argument lists got an additional argument or two.

libdwarf/dwarf_form.c
fix a comment
2016-03-09 08:42:50 -08:00
David Anderson
3f7aba30b8 dwarfdump.c,globals.h,print_aranges.c,print_die.c,
print_frames.c,print_lines.c,print_locs.c,print_macro.c,
      print_pubnames.c,print_reloc.ckprint_static_funcs.c,
      print_static_vars.c,print_strings.c,print_types.c,
      print_weaknames.c: Removed global Dwarf_Error err
      and provided local Dwarf_Error as needed.

libdwarf2.1.mm: Added dwarf_lineoff_b() documentation.
Fixed a typo in dwarf_formexprloc() documentation.
libdwarf2.1.pdf: Regenerated. Version 2.41
2016-02-13 12:53:11 -08:00
David Anderson
4e8d8c0f10 Add local Dwarf_Error and
rename variables to avoid shadowing confusion.

dwarfdump/configure
dwarfdump/configure.in
dwarfdump/dwarf_tsearchbal.c
dwarfdump/dwarfdump.c
dwarfdump/globals.h
dwarfdump/print_abbrevs.c
dwarfdump/print_aranges.c
dwarfdump/print_debugfission.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_gdbindex.c
dwarfdump/print_lines.c
dwarfdump/print_pubnames.c
dwarfdump/print_ranges.c
dwarfdump/print_sections.c
dwarfdump/tag_attr.c
dwarfdump/tag_tree.c

Add local Dwarf_Error and
rename variables to avoid shadowing confusion.
Make cross-build a littl easier.

libdwarf/Makefile.in
libdwarf/README
libdwarf/common.c
libdwarf/common.h
libdwarf/configure
libdwarf/configure.in
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_print_lines.c
libdwarf/dwarf_ranges.c
libdwarf/gennames.c
2016-02-13 08:37:24 -08:00
David Anderson
9f20a2ea09 Ensure the four
error-reporting globals DIE_[CU_][global_]_offset are
set properly.
dwarfdump/print_aranges.c
dwarfdump/print_die.c
2015-12-16 09:26:38 -08:00
David Anderson
06cc0571a5 Small improvement in dwarfdump debug_macro printing (when no .debug_macro
section).
Improved dwarfdump PRINT_CU_INFO() so it works right and has
no side effect.
2015-12-16 08:06:29 -08:00
David Anderson
9bd64020d5 Mention the effec of zdebug on offsets
shown by dwarfdump.
dwarfdump/dwarfdump.1

Now we get the real section names from
libdwarf.
dwarfdump/print_aranges.c
dwarfdump/print_die.c
dwarfdump/print_lines.c
dwarfdump/print_ranges.c
dwarfdump/print_strings.c

Add functions to get the true
section names.
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_line.c
libdwarf/libdwarf.h.in

Document the new functions. Version 2.35
libdwarf/libdwarf2.1.mm

Regenerate.
libdwarf/libdwarf2.1.pdf
2015-11-27 15:44:13 -08:00
Carlos Alberto Enciso
041cbcb69b These changes cover the following areas:
1) Improve the '-S' option algorithm, to get indirect names, from
   DW_AT_specification and DW_AT_abstract_origin attributes, to use
   those names in the comparison for member and inlines functions.
2) Correct incorrect calculation of 'pointer_size' for proprietary
   EM_PPC64 machine type.
3) Changes required when porting the samples to Windows
4) Include additional information for the Windows version.
2015-06-15 10:41:47 +01:00
David Anderson
ad33389a2c dwarfdump (not libdwarf): removed obsolete postal
address and web address about SGI.
Historical versions still shown in the
DWARFDUMPCOPYRIGHT file.
2015-01-31 09:42:29 -08:00
David Anderson
affafa89fb Removed trailing (and useless) whitespace from all the lines
containing it.  Many many files had such.
2014-01-29 15:02:07 -08:00
David Anderson
b7453e661a dwarfdump now uses esb_s more instead of char*.
Now checks for DA_AT_sibling errors.
dwarfdump2 now checks for DW_AT_sibling errors too.
2013-02-06 21:48:31 -08:00
David Anderson
22cc16439d Update copyright year on a large number of files.
Everthing touched recently.
2012-11-17 13:31:29 -08:00
Carlos Alberto Enciso
82491fc2c7 Changes requested by David Anderson and described below. Also a general
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;
2012-11-01 12:35:57 +00:00
David Anderson
4c9b0f1ae8 * dwarfdump.c,print_aranges.c,print_reloc.c: A few indents
did not match the standard multiple-of-4-spaces. Corrected.
2011-06-05 07:37:26 -07:00
David Anderson
2871177bc5 dwarfdump
DavidAnderson <davea42@earthlink.net>
      * checkutil.c (ProcessBucketGroup): Deleted unused
        local variables.
      * common.c: Updated version string.
      * dwarfdump.1: Made the -k discussion more complete and accurate.
        Most option details are in the dwarfdump help/usage message, not
        in dwarfdump.1, to keep the man page small.
      * dwarfdump.c: Updated version string. Made more variables static
        in recognition they are only touched in this file.  Added {} on
        some if statements to make the body clear. Parenthesized a
        complex test with && || to clarify intent.  Added sanity testing
        of the 'current compiler' count and its use.
      * globals.h: Added safe_strcpy() prototype as it is used by multiple
        source files so we need a visible prototype.
      * print_aranges.c: Add 'arange end' printing (it is a real DWARF
        record type, so should be printed). Add a test to avoid duplicated
        die printing and error-counting when it is not requested.
      * print_die.c: An = in an if corrected to ==.  Parenthesized a
        complex test with && || to clarify intent.  Deleted an unused
        local variable.
      * print_lines.c: Deleted unused local variables. Added {} for each
        struct in an array so the initialization gets done right.
      * tag_attr.c: Deleted an unused local variable.
      * tag_tree.c: Deleted an unused local variable.

dwarfdump2
2010-06-04  DavidAnderson <davea42@earthlink.net>
      * dwarfdump.cc: Updated DWARF_VERSION string.
2011-06-04 14:22:26 -07:00
David Anderson
7647aaeca8 Everything changed. New indentation. Many new DWARF correctness
tests.  New options.   Error summaries reported by compiler name.
2011-03-29 13:43:05 -07:00
David Anderson
637442ea0b Initial commit. Content is the libdwarf-20110113.tar.gz
last-released-libdwarf and dwarfdump.
2011-03-19 11:38:11 -07:00