Commit Graph

94 Commits

Author SHA1 Message Date
David Anderson
e9ad8dc70f Updated dwarfdump[2] version strings to May 19.
Clarified libdwarf/NEWS
2014-05-19 17:17:48 -07:00
David Anderson
f471b3786b Adds support and refactoring for reading and printing
DebugFission data.  There are new attributes (with GNU
forms and standard forms) and DW_OP's too.
Libdwarf reader code refactored so the new sections are
easily handled.
2014-05-16 19:10:52 -07:00
David Anderson
af405cd9a4 Added support for DW_FORM_GNU_str_index and debug fission (.dwo)
GNU objects.   Partial support for DW_FORM_GNU_addr_index.
2014-05-11 10:05:53 -07:00
David Anderson
2346f43f57 Updated version strings
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump2/common.cc
dwarfdump2/dwarfdump.cc

now prints offset_size with -v (for each CU).
dwarfdump/print_die.c
dwarfdump2/print_die.cc

Corrects old bug in the uri code, typed 0 in hexdig() when '0' was meant.
dwarfdump2/uri.cc
dwarfdump/uri.c
2014-04-15 12:52:05 -07:00
David Anderson
0b74b13808 Update version string.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump2/ChangeLog
dwarfdump2/common.cc
dwarfdump2/dwarfdump.cc

Changed the implementation of DW_FORM_ref_addr
to properly reflect the V2 vs V3 and later
specifications.
libdwarf/dwarf_addr_finder.c libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_form.c        libdwarf/dwarf_query.c
libdwarf/dwarf_util.c        libdwarf/dwarf_util.h
libdwarf/pro_forms.c         libdwarf/pro_section.c
2014-04-13 16:45:17 -07:00
David Anderson
2444c42211 Updated version strings.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump2/common.cc
dwarfdump2/dwarfdump.cc
2014-02-08 14:34:19 -08:00
David Anderson
5211b541d2 Final small changes for a new release.
Ensuring it builds where it should.
2014-02-01 08:06:09 -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
a33289863d 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.
2013-08-15 12:42:44 -07:00
David Anderson
956ef67f45 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.
2013-08-08 08:37:04 -07:00
David Anderson
26bda10be1 Updated dwarfdump[2] version strings to today. 2013-07-30 09:15:35 -07: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
50b3584faa Fixes trivial indentation in 2 places.
More imporantly, in print_die.c (dwarfdump) it
removes static string buffers and makes them local
so we guarantee clean strings with no use of
makename() involved in printing DIEs.
Avoids a memory leak and should be faster.
2013-02-01 13:09:10 -08:00
David Anderson
cc781ea02f Revised libdwarf.h to restore interface binary compatibility
with releases before 25Jan 2013.
Updated libdwarf2.1.mm and pdf to reflect handling
DW_OP_GNU_const_type.
2013-01-26 10:03:38 -08:00
David Anderson
558aae674e Handling of DW_OP_GNU_const_type was incorrect leading
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.
2013-01-25 15:58:34 -08:00
David Anderson
07a8889ba8 Update Dwarf Version string. 2013-01-16 15:55:12 -08:00
David Anderson
b446e23dc2 libdwarf now handles DW_OP_GNU_implicit_pointer and other GNU
ops more correctly and completely. As do dwarfdump[2].
dwarf.h has more DW_OP_GNU listed.
2012-11-30 15:01:47 -08:00
David Anderson
e5e99e5b17 Move static array with changeable data into Dwarf_Debug struct,
fixing botch in 20121127 release.
Fix value returned (through argument) from dwarf_formflag().
Make some global data which is actually const as const.
2012-11-29 14:34:45 -08:00
David Anderson
894daed653 Updating date string for release. 20121127 2012-11-27 11:21:57 -08:00
David Anderson
67aea7c780 Updated version strings:
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
2012-11-20 10:35:53 -08:00
David Anderson
95e3bc880c Updated version strings in dwarfdump and dwarfdump2. 2012-11-17 13:34:24 -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
unknown
2c52668c4c Changes by SN Systems (Carlos Alberto Enciso), that include our modifications. 2012-07-25 16:03:36 +01:00
David Anderson
a0e4e96b21 updated dwarfdump[2] version strings and updated
ChangeLog (old is now ChangeLog2011)
2012-04-10 11:46:59 -07:00
David Anderson
b2a5f3c9dc CPTOPUBLIC now has additional dwarfgen file listed.
dwarfdump[2] have new information about tag-attr relationships
for GNU extensions.  New date strings.
2011-12-13 13:29:49 -08:00
David Anderson
7fe2172b26 Updated dwarfdump[2] version strings. 2011-10-29 16:37:34 -07:00
David Anderson
9fb9777ac0 Updates version strings. Fixes dwarfdump2 problem with -c<cuname>
option.
2011-10-24 15:45:47 -07:00
David Anderson
4920a0d8b6 Now dwarfdump.1 is complete and correct documentation.
Now .debug_ranges is no longer printed by default, DWARF does not
guarantee that can work as reading the section itself.
Updated version strings.
2011-10-23 08:03:03 -07:00
David Anderson
0a94d4f576 Fix the -Wp output from dwarfdump (dwarfdump2 was already ok) and
change the -S option to use uri-to-standard-string conversion so
strings with spaces or other problematic characters are easily entered.
2011-10-11 16:05:28 -07:00
David Anderson
42f5af345f Update CPTOPUBLIC so the dwarfdump2 checkutil files are copied.
Update the dwarfdump[2] version strings.
2011-10-09 10:52:55 -07:00
David Anderson
ef9e0df75c Updating dwarfdump2 so it looks a lot like dwarfdump at the level of dwarfdump.cc. But using C++ features instead of C for various data structures. 2011-09-20 16:46:47 -07:00
David Anderson
51d5389295 libdwarf: adding checks so small elf mistakes by compiler/linker
which result in a a bad object file are noticed by libdwarf, which
returns an error instead of seg-faulting or reading past
the end of malloc spaces.
2011-09-16 14:20:13 -07:00
David Anderson
cef68a7c1d New checks in Elf reading code notices errors in Elf
files and avoids coredumps in libdwarf.
2011-09-15 15:59:21 -07:00
David Anderson
b07af3d90f Now check for an erroneous address_size or segment size in
dwarf headers.
2011-09-14 16:59:56 -07:00
David Anderson
a32a29a3ef Updating libdwarf_dwarf_loc.c by testing for incorrectly-ended
expression block.  Update dwarfdump version strings.
2011-09-02 14:30:57 -07:00
David Anderson
98307d518c libdwarf now implements a new dwarf_producer_init_c() interface
and its callback function.   It is documented in libdwarf/libdwarf2p.1.mm.
Date stamps are updated in both dwarfdumps even though there was no
reader code change.
2011-06-12 17:20:07 -07:00
David Anderson
d4df0eefc9 2011-06-07 DavidAnderson <davea42@earthlink.net>
* common.c: Updated version string.
      * dwarfdump.c: Updated version string, fixed indentation.
      * print_lines.c: Two line table checks moved from
        decl_file to line_table sections of the summary report
        and both now show the possibly-wrong pc.
        Since one is not necessarily a bug, the wording of the
        message now has 'possibly' in it.
      * print_die.c: Reinitialize subprogram-relative pc high/low
        seen_PU_high_address
        whenever compilation unit changes, and use that field
        to avoid an erroneous  comparison (when checking for an error).
        Fix some indentation errors introduced recently.
2011-06-07 09:18:09 -07:00
David Anderson
93d416e4e0 dwarfdump/dwarfdump.c dwarfdump2/dwarfdump.cc
now handle DW_AT_data_member_location instead of erroring off.
Added a new query function into libdwarf.h and dwarf_query.c
and documented the function in libdwarf/libdwarf2.1.mm and regenerated
libdwarf/libdwarf2.1.pdf
2011-06-06 14:45:03 -07:00
David Anderson
14ed7beb3a Updated version strings.
dwarfdump/ChangeLog
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump2/ChangeLog
dwarfdump2/dwarfdump.cc
2011-06-05 08:00:17 -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
877f645b37 Now UPDATEDWARFDUMPVERSION.sh fixes all version strings.
Fixed a tiny bug in libdwarf/pro_error.c (that you probably
never encountered or noticed).  Updated 2 lines in
libdwarf/dwarf_frame.c that were indented badly.
2011-04-23 09:21:08 -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