Commit Graph

374 Commits

Author SHA1 Message Date
Carlos Alberto Enciso
fc59b0eb02 1) Update the Tag-Tree and Tag-Attr rules to include missing rules;
these new rules are generated by the LLVM toolchain
2) Define 2 symbols in dwarf.h, to indicate the last define TAG and Attribute
2014-09-10 09:34:43 +01:00
Carlos Alberto Enciso
5a2872d956 1) Couple of C99 issues (local variables)
2) Remove some trailing whitespaces
2014-09-10 09:12:23 +01:00
Carlos Alberto Enciso
c6da2c7817 Merge branch 'master' into carlos_enciso
* 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
2014-09-05 12:35:34 +01:00
David Anderson
80eb13ac27 3 one-line fixes, removing three compiler warnings.
dwarfdump/print_die.c

libdwarf/dwarf_macro.c
libdwarf/dwarf_xu_index.c
2014-08-11 14:18:40 -07:00
David Anderson
6caed6d274 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

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
2014-08-04 13:48:31 -07:00
David Anderson
93fff9424c libdwarf: minor correction addeing section name to one function
and now documents the new gdbindx and debug fission (DWP)
interfaces.
2014-08-02 14:20:38 -07:00
David Anderson
61ffe240f6 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.
2014-07-12 13:23:29 -07:00
David Anderson
901e351412 libdwarf/dwarf_opaque.h: One new comment had a bad
indent. Fixed.
2014-07-11 16:04:07 -07:00
David Anderson
f9d9bba06f libdwarf/dwarf_opaque.h: Clarified the meaning of
various CU context struct fields by adding comments.
2014-07-11 16:02:02 -07:00
David Anderson
aa30004c5e libdwarf/dwarf_opaque.h: Altered a couple comments
to make them clearer.
2014-07-11 15:24:08 -07:00
David Anderson
99e0371819 Now -I now prints the entire
.debug_cu_index and .debug_tu_index sections.
2014-07-11 09:22:35 -07:00
David Anderson
9e6e320165 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.
2014-07-10 16:19:33 -07:00
David Anderson
4147a4e29d Clarify a comment in dwarf_die_deliv.c. 2014-07-10 16:17:31 -07:00
David Anderson
2b1c474738 Fixed the libdwarf ChangeLog. Minor typo in a
just-commited entry.
2014-07-10 15:59:10 -07:00
David Anderson
03a0883cb6 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).
2014-07-10 15:58:02 -07:00
David Anderson
2eccd90196 Removed some newly introduced trailing whitespace characters. 2014-07-09 14:51:37 -07:00
David Anderson
f8caa95d63 libdwarf and dwarfdump now begin to support the DWARF5
sections .debug_tu_index and .debug_cu_index.
2014-07-09 14:45:30 -07:00
David Anderson
0fed4afaa7 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.
2014-07-05 10:14:12 -07:00
David Anderson
9297b3032a 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.

Removes unused local variables.
Switches a couple struct members (in dwarf_opaque.h) from
Dwarf_Word to Dwarf_Unsigned.
2014-07-03 12:47:54 -07:00
David Anderson
a7096d4360 libdwarf: removed newly introduced indent errors and removed
newly introduced trailing whitespace.
2014-07-01 17:00:08 -07:00
David Anderson
a4fce73349 Now we can print the gdb_index symboltable data too. 2014-07-01 16:48:59 -07:00
David Anderson
d429117666 This adds implementation for the gdb_index address area. 2014-06-30 14:19:33 -07:00
David Anderson
18543b5eb8 Now gets and prints the gdbindex type unit list. 2014-06-30 12:05:50 -07:00
David Anderson
c7b7336f93 Got the new files added into git.
Now we access and print the gdbindex header
and the CU list.
2014-06-30 11:21:16 -07:00
David Anderson
b37e94d0a7 Adds printing of the .gdb_index section header
and the -I dwarfdump option to select that section.
2014-06-29 11:55:51 -07:00
David Anderson
e9ad8dc70f Updated dwarfdump[2] version strings to May 19.
Clarified libdwarf/NEWS
2014-05-19 17:17:48 -07:00
David Anderson
858fd0df59 A few files had unused variables. Now fixed.
dwarf_query.c had a bug, hidden by an ommission from
dwarf_opaque.h.    All these were exposed by compiling -Wall.
2014-05-19 13:35:00 -07:00
David Anderson
047b0bbea6 Fixed Changelog libdwarf2.1.mm rev number. it is 2.20 now. 2014-05-18 12:04:28 -07:00
David Anderson
e859b60c43 Fixed typo in libdwarf2.1.mm on the new
dwarf_get_debug_addr_index() function. Regenerated pdf, now at 2.20
2014-05-18 12:02:55 -07:00
David Anderson
2be4cef410 libdwarf: dwarf_loc.: Fixed offset update for DW_OP_constx/addrx. 2014-05-18 11:52:13 -07:00
David Anderson
ac36af2ee0 libdwarf: dwarf_form.c dwarf_loc.c: fixed whitespace,
added commentary.
2014-05-18 11:44:36 -07:00
David Anderson
732d6477eb libdwarf: libdwarf.h.in, dwarf_form.c: Restored the function
dwarf_get_debug_addr_index(). It is useful as a convenience
for apps like dwarfdump.
2014-05-18 11:18:46 -07:00
David Anderson
2b628409f9 Fixed numerous indent errors and removed
trailing whitespace.
2014-05-18 10:51:30 -07:00
David Anderson
f5e2be3ebd Now handles most of Debug Fission, but
this version needs small corrections to finish the
DebugFission support.
2014-05-18 10:29:33 -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
fdab3d43b4 Inserting the new dwarf.h encodings.
DWARF5.
These are not necessarily final, things may change
in DWARF5.
2014-05-12 16:43:25 -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
d04127746d libdwarf/Makefile.in modified so it does not
list the stdout to the terminal, but to a local file.
It's essentiall always useless information.
2014-05-09 11:33:29 -07:00
David Anderson
c6a2ce4cc1 This is an incompatible source change to the
dwarf_producer_init() function.

The new interface is more extensible and allows for production
of DWARF versions post version 2 (such later versions are not
actually supported yet).  Uses of the producer interface have
to change their calls to dwarf_producer_init*() to match the
new interface.

Callers to the consumer (reader) interface are not
affected.

dwarfgen/dwarfgen.cc
libdwarf/dwarf.h
libdwarf/dwarf_error.c
libdwarf/libdwarf.h.in
libdwarf/libdwarf2p.1.mm
libdwarf/libdwarf2p.1.pdf
libdwarf/pro_forms.c
libdwarf/pro_init.c
libdwarf/pro_opaque.h
libdwarf/pro_reloc.c
libdwarf/pro_reloc_stream.c
libdwarf/pro_reloc_symbolic.c
libdwarf/pro_section.c
libdwarf/pro_util.h
2014-05-09 10:55:11 -07:00
David Anderson
e0c87d2816 Modified a comment in libdwarf/pro_forms.c
about DW_FORM_ref_addr.  No logic changed, just a comment changed.
2014-04-14 10:36:20 -07:00
David Anderson
56b634a16c deleted libdwarf/bldDWindex.sh
as that tiny shell script for post-processing
DWARF2 postscript was never
actually useful.
2014-04-14 10:32:21 -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
87f877b87d libdwarf2.1.mm Fixed examples involving dwarf_offdie_b()
libdwarf2.1.pdf Regenerated. Now at version 2.17
2014-04-02 13:45:55 -07:00
David Anderson
11dd755edb Noted in libdwarf/NEWS that
the dwarf.v2.mm and index.v2.mm are no longer
in the distribution, they are on dwarfstd.org
2014-03-17 18:45:45 -07:00
David Anderson
5db32452fc The following files have been deleted here,
no longer useful here.  See dwarfstd.org
for these and other files about the standard(s).
dwarf.v2.mm
dwarf.v2.pdf
index.v2.mm
index.v2.pdf

Removed mention of the above files from :
COPYING
Makefile.in
README
2014-03-17 15:45:25 -07:00
David Anderson
5851b1c68e Adds commentary about the use of the sect_name_index
in the callback function (used for each new
debug section libdwarf is asked to create).

dwarfgen/dwarfgen.cc
libdwarf/libdwarf2p.1.mm  Version 1.35
libdwarf/libdwarf2p.1.pdf (regenerated)
2014-02-08 12:43:39 -08:00
David Anderson
bf7eeb1c30 Just fixing trailing-whitespace and a pair of indent
issues in libdwarf.
2014-02-02 09:21:52 -08:00
David Anderson
1ca3a407d7 libdwarf/dwarf_alloc.c: Removed a long list of if()
tests referring to debug section addresses
in favor of a single dwarf_tfind().
It will continue to work over time, the earlier
approach was error-prone in the face of new DWARF
sections.
2014-02-02 09:00:24 -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
26e306335e Changes support DW_FORM_exprloc.
Changes support, to a limited extent, DW_FORM_GNU_ref_alt
       and DW_FORM_GNU_strp_alt.
Updated libdwarfdoc about DW_FORM_exprloc support.
2014-01-30 16:29:14 -08:00