rdwarf 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +28 -0
  6. data/README.md +39 -0
  7. data/Rakefile +8 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +7 -0
  10. data/ext/rdwarf/depend +5 -0
  11. data/ext/rdwarf/extconf.rb +29 -0
  12. data/ext/rdwarf/libdwarf/CHANGES +102 -0
  13. data/ext/rdwarf/libdwarf/CODINGSTYLE +71 -0
  14. data/ext/rdwarf/libdwarf/COPYING +28 -0
  15. data/ext/rdwarf/libdwarf/ChangeLog +619 -0
  16. data/ext/rdwarf/libdwarf/ChangeLog2006 +835 -0
  17. data/ext/rdwarf/libdwarf/ChangeLog2007 +217 -0
  18. data/ext/rdwarf/libdwarf/ChangeLog2008 +263 -0
  19. data/ext/rdwarf/libdwarf/ChangeLog2009 +348 -0
  20. data/ext/rdwarf/libdwarf/ChangeLog2010 +175 -0
  21. data/ext/rdwarf/libdwarf/ChangeLog2011 +297 -0
  22. data/ext/rdwarf/libdwarf/ChangeLog2012 +131 -0
  23. data/ext/rdwarf/libdwarf/ChangeLog2013 +238 -0
  24. data/ext/rdwarf/libdwarf/ChangeLog2014 +399 -0
  25. data/ext/rdwarf/libdwarf/LGPL.txt +504 -0
  26. data/ext/rdwarf/libdwarf/LIBDWARFCOPYRIGHT +40 -0
  27. data/ext/rdwarf/libdwarf/Makefile.in +220 -0
  28. data/ext/rdwarf/libdwarf/NEWS +535 -0
  29. data/ext/rdwarf/libdwarf/README +235 -0
  30. data/ext/rdwarf/libdwarf/checkexamples.c +1179 -0
  31. data/ext/rdwarf/libdwarf/cmplrs/dwarf_addr_finder.h +55 -0
  32. data/ext/rdwarf/libdwarf/common.c +62 -0
  33. data/ext/rdwarf/libdwarf/common.h +38 -0
  34. data/ext/rdwarf/libdwarf/config.h.in +146 -0
  35. data/ext/rdwarf/libdwarf/configure +5581 -0
  36. data/ext/rdwarf/libdwarf/configure.in +167 -0
  37. data/ext/rdwarf/libdwarf/dw-linetableheader.txt +39 -0
  38. data/ext/rdwarf/libdwarf/dwarf.h +1342 -0
  39. data/ext/rdwarf/libdwarf/dwarf_abbrev.c +291 -0
  40. data/ext/rdwarf/libdwarf/dwarf_abbrev.h +45 -0
  41. data/ext/rdwarf/libdwarf/dwarf_addr_finder.c +676 -0
  42. data/ext/rdwarf/libdwarf/dwarf_alloc.c +685 -0
  43. data/ext/rdwarf/libdwarf/dwarf_alloc.h +38 -0
  44. data/ext/rdwarf/libdwarf/dwarf_arange.c +595 -0
  45. data/ext/rdwarf/libdwarf/dwarf_arange.h +62 -0
  46. data/ext/rdwarf/libdwarf/dwarf_base_types.h +157 -0
  47. data/ext/rdwarf/libdwarf/dwarf_die_deliv.c +1802 -0
  48. data/ext/rdwarf/libdwarf/dwarf_die_deliv.h +46 -0
  49. data/ext/rdwarf/libdwarf/dwarf_elf_access.c +1348 -0
  50. data/ext/rdwarf/libdwarf/dwarf_elf_access.h +46 -0
  51. data/ext/rdwarf/libdwarf/dwarf_error.c +492 -0
  52. data/ext/rdwarf/libdwarf/dwarf_error.h +53 -0
  53. data/ext/rdwarf/libdwarf/dwarf_form.c +1302 -0
  54. data/ext/rdwarf/libdwarf/dwarf_frame.c +2454 -0
  55. data/ext/rdwarf/libdwarf/dwarf_frame.h +418 -0
  56. data/ext/rdwarf/libdwarf/dwarf_frame2.c +1533 -0
  57. data/ext/rdwarf/libdwarf/dwarf_frame3.c +282 -0
  58. data/ext/rdwarf/libdwarf/dwarf_funcs.c +123 -0
  59. data/ext/rdwarf/libdwarf/dwarf_funcs.h +33 -0
  60. data/ext/rdwarf/libdwarf/dwarf_gdbindex.c +520 -0
  61. data/ext/rdwarf/libdwarf/dwarf_gdbindex.h +97 -0
  62. data/ext/rdwarf/libdwarf/dwarf_global.c +612 -0
  63. data/ext/rdwarf/libdwarf/dwarf_global.h +117 -0
  64. data/ext/rdwarf/libdwarf/dwarf_harmless.c +228 -0
  65. data/ext/rdwarf/libdwarf/dwarf_harmless.h +31 -0
  66. data/ext/rdwarf/libdwarf/dwarf_incl.h +61 -0
  67. data/ext/rdwarf/libdwarf/dwarf_init_finish.c +1263 -0
  68. data/ext/rdwarf/libdwarf/dwarf_leb.c +159 -0
  69. data/ext/rdwarf/libdwarf/dwarf_line.c +1822 -0
  70. data/ext/rdwarf/libdwarf/dwarf_line.h +446 -0
  71. data/ext/rdwarf/libdwarf/dwarf_line2.c +98 -0
  72. data/ext/rdwarf/libdwarf/dwarf_line_table_reader_common.c +1583 -0
  73. data/ext/rdwarf/libdwarf/dwarf_loc.c +1525 -0
  74. data/ext/rdwarf/libdwarf/dwarf_loc.h +149 -0
  75. data/ext/rdwarf/libdwarf/dwarf_loc2.c +833 -0
  76. data/ext/rdwarf/libdwarf/dwarf_macro.c +479 -0
  77. data/ext/rdwarf/libdwarf/dwarf_macro.h +35 -0
  78. data/ext/rdwarf/libdwarf/dwarf_opaque.h +778 -0
  79. data/ext/rdwarf/libdwarf/dwarf_original_elf_init.c +219 -0
  80. data/ext/rdwarf/libdwarf/dwarf_print_lines.c +631 -0
  81. data/ext/rdwarf/libdwarf/dwarf_pubtypes.c +132 -0
  82. data/ext/rdwarf/libdwarf/dwarf_query.c +1594 -0
  83. data/ext/rdwarf/libdwarf/dwarf_ranges.c +194 -0
  84. data/ext/rdwarf/libdwarf/dwarf_reloc_arm.h +308 -0
  85. data/ext/rdwarf/libdwarf/dwarf_reloc_mips.h +117 -0
  86. data/ext/rdwarf/libdwarf/dwarf_reloc_ppc.h +242 -0
  87. data/ext/rdwarf/libdwarf/dwarf_reloc_ppc64.h +272 -0
  88. data/ext/rdwarf/libdwarf/dwarf_reloc_x86_64.h +127 -0
  89. data/ext/rdwarf/libdwarf/dwarf_sort_line.c +665 -0
  90. data/ext/rdwarf/libdwarf/dwarf_string.c +82 -0
  91. data/ext/rdwarf/libdwarf/dwarf_stubs.c +38 -0
  92. data/ext/rdwarf/libdwarf/dwarf_tied.c +423 -0
  93. data/ext/rdwarf/libdwarf/dwarf_tsearch.h +125 -0
  94. data/ext/rdwarf/libdwarf/dwarf_tsearchhash.c +675 -0
  95. data/ext/rdwarf/libdwarf/dwarf_types.c +121 -0
  96. data/ext/rdwarf/libdwarf/dwarf_types.h +32 -0
  97. data/ext/rdwarf/libdwarf/dwarf_util.c +913 -0
  98. data/ext/rdwarf/libdwarf/dwarf_util.h +324 -0
  99. data/ext/rdwarf/libdwarf/dwarf_vars.c +125 -0
  100. data/ext/rdwarf/libdwarf/dwarf_vars.h +29 -0
  101. data/ext/rdwarf/libdwarf/dwarf_weaks.c +123 -0
  102. data/ext/rdwarf/libdwarf/dwarf_weaks.h +29 -0
  103. data/ext/rdwarf/libdwarf/dwarf_xu_index.c +579 -0
  104. data/ext/rdwarf/libdwarf/dwarf_xu_index.h +68 -0
  105. data/ext/rdwarf/libdwarf/dwgetopt.c +181 -0
  106. data/ext/rdwarf/libdwarf/dwgetopt.h +51 -0
  107. data/ext/rdwarf/libdwarf/gennames.c +531 -0
  108. data/ext/rdwarf/libdwarf/install.sh +119 -0
  109. data/ext/rdwarf/libdwarf/libdwarf.h.in +3746 -0
  110. data/ext/rdwarf/libdwarf/libdwarf2.1.mm +9805 -0
  111. data/ext/rdwarf/libdwarf/libdwarf2.1.pdf +0 -0
  112. data/ext/rdwarf/libdwarf/libdwarf2p.1.mm +2807 -0
  113. data/ext/rdwarf/libdwarf/libdwarf2p.1.pdf +0 -0
  114. data/ext/rdwarf/libdwarf/libdwarfdefs.h +81 -0
  115. data/ext/rdwarf/libdwarf/malloc_check.c +327 -0
  116. data/ext/rdwarf/libdwarf/malloc_check.h +52 -0
  117. data/ext/rdwarf/libdwarf/mips_extensions.mm +1266 -0
  118. data/ext/rdwarf/libdwarf/mips_extensions.pdf +0 -0
  119. data/ext/rdwarf/libdwarf/pro_alloc.c +179 -0
  120. data/ext/rdwarf/libdwarf/pro_alloc.h +33 -0
  121. data/ext/rdwarf/libdwarf/pro_arange.c +310 -0
  122. data/ext/rdwarf/libdwarf/pro_arange.h +51 -0
  123. data/ext/rdwarf/libdwarf/pro_die.c +431 -0
  124. data/ext/rdwarf/libdwarf/pro_die.h +59 -0
  125. data/ext/rdwarf/libdwarf/pro_encode_nm.c +108 -0
  126. data/ext/rdwarf/libdwarf/pro_encode_nm.h +39 -0
  127. data/ext/rdwarf/libdwarf/pro_error.c +96 -0
  128. data/ext/rdwarf/libdwarf/pro_error.h +43 -0
  129. data/ext/rdwarf/libdwarf/pro_expr.c +575 -0
  130. data/ext/rdwarf/libdwarf/pro_expr.h +36 -0
  131. data/ext/rdwarf/libdwarf/pro_finish.c +45 -0
  132. data/ext/rdwarf/libdwarf/pro_forms.c +1271 -0
  133. data/ext/rdwarf/libdwarf/pro_frame.c +572 -0
  134. data/ext/rdwarf/libdwarf/pro_frame.h +120 -0
  135. data/ext/rdwarf/libdwarf/pro_funcs.c +50 -0
  136. data/ext/rdwarf/libdwarf/pro_incl.h +91 -0
  137. data/ext/rdwarf/libdwarf/pro_init.c +327 -0
  138. data/ext/rdwarf/libdwarf/pro_line.c +373 -0
  139. data/ext/rdwarf/libdwarf/pro_line.h +112 -0
  140. data/ext/rdwarf/libdwarf/pro_macinfo.c +457 -0
  141. data/ext/rdwarf/libdwarf/pro_macinfo.h +31 -0
  142. data/ext/rdwarf/libdwarf/pro_opaque.h +513 -0
  143. data/ext/rdwarf/libdwarf/pro_pubnames.c +60 -0
  144. data/ext/rdwarf/libdwarf/pro_reloc.c +253 -0
  145. data/ext/rdwarf/libdwarf/pro_reloc.h +38 -0
  146. data/ext/rdwarf/libdwarf/pro_reloc_stream.c +256 -0
  147. data/ext/rdwarf/libdwarf/pro_reloc_stream.h +52 -0
  148. data/ext/rdwarf/libdwarf/pro_reloc_symbolic.c +245 -0
  149. data/ext/rdwarf/libdwarf/pro_reloc_symbolic.h +45 -0
  150. data/ext/rdwarf/libdwarf/pro_section.c +2233 -0
  151. data/ext/rdwarf/libdwarf/pro_section.h +100 -0
  152. data/ext/rdwarf/libdwarf/pro_types.c +274 -0
  153. data/ext/rdwarf/libdwarf/pro_types.h +34 -0
  154. data/ext/rdwarf/libdwarf/pro_util.h +38 -0
  155. data/ext/rdwarf/libdwarf/pro_vars.c +52 -0
  156. data/ext/rdwarf/libdwarf/pro_weaks.c +51 -0
  157. data/ext/rdwarf/rdwarf.c +765 -0
  158. data/ext/rdwarf/rdwarf.h +52 -0
  159. data/ext/rdwarf/rdwarf_names_gen.rb +109 -0
  160. data/lib/rdwarf.rb +181 -0
  161. data/lib/rdwarf/version.rb +3 -0
  162. data/rdwarf.gemspec +30 -0
  163. metadata +251 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5025e79195f3e1a040f05e3e0c89c2ff02055a1f
4
+ data.tar.gz: 46af846fae0a900a921c4617ac0ac4abc9b24be0
5
+ SHA512:
6
+ metadata.gz: 1230590d3eeb1b0d42944861f9c57d83eb4ed83c217307a3fcd70a417b7a3c6a053f49f8d5a8777183c2bf806a1a632fcec2ccd73f850d6f75ecbad6ac59500d
7
+ data.tar.gz: 36b2ab2fe6ad184c5da6c7f03eb6a48e3456372671de43c528cfb3e8da2fc8f624c0aafcd14d7d5fbfe2753e7ec2d94a295c4545e9866061cdacdd82d614a61b
@@ -0,0 +1,16 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /ext/rdwarf/Makefile
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ *.bundle
12
+ *.so
13
+ *.o
14
+ *.a
15
+ *~
16
+ mkmf.log
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rdwarf.gemspec
4
+ gemspec
@@ -0,0 +1,28 @@
1
+ Copyright (C) 2015 Kubo Takehiro <kubo@jiubao.org>
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above
10
+ copyright notice, this list of conditions and the following
11
+ disclaimer in the documentation and/or other materials provided
12
+ with the distribution.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR
15
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE
18
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
21
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
24
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ The views and conclusions contained in the software and documentation
27
+ are those of the authors and should not be interpreted as representing
28
+ official policies, either expressed or implied, of the authors.
@@ -0,0 +1,39 @@
1
+ # Rdwarf
2
+
3
+ Rdwarf is a ruby module to read DWARF debugging information using [libdwarf](http://www.prevanders.net/dwarf.html).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'rdwarf'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install rdwarf
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kubo/rdwarf.
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [LGPL 2.1](https://opensource.org/licenses/LGPL-2.1) as a whole.
38
+
39
+ Files under ext/rdwarf/libdwarf, which were copied from [libdwarf](http://www.prevanders.net/dwarf.html), are licensed under the LGPL2.1. Others are licensed under the 2-clause BSD license.
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/extensiontask"
3
+
4
+ task :build => :compile
5
+
6
+ Rake::ExtensionTask.new("rdwarf") do |ext|
7
+ ext.lib_dir = "lib/rdwarf"
8
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "rdwarf"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ rdwarf_names.c: $(srcdir)/rdwarf_names_gen.rb $(srcdir)/libdwarf/dwarf.h
2
+ $(ruby) $(srcdir)/rdwarf_names_gen.rb $(srcdir)/libdwarf/dwarf.h > rdwarf_names.c
3
+
4
+ libdwarf/libdwarf.a:
5
+ cd libdwarf && make
@@ -0,0 +1,29 @@
1
+ require "mkmf"
2
+
3
+ if !have_header('libelf.h') || !have_library('elf', 'elf_begin')
4
+ puts "ERROR: libelf is not found."
5
+ exit 1
6
+ end
7
+
8
+ libdwarf_dir = "#{File.absolute_path(File.dirname(__FILE__))}/libdwarf"
9
+
10
+ Dir.exist?('libdwarf') or Dir.mkdir('libdwarf')
11
+
12
+ Dir.chdir('libdwarf') do
13
+ env = {
14
+ 'CC' => RbConfig::CONFIG['CC'],
15
+ 'CPP' => RbConfig::CONFIG['CPP'],
16
+ 'CFLAGS' => RbConfig::CONFIG['CFLAGS'],
17
+ }
18
+ cmd = "#{libdwarf_dir}/configure"
19
+ message("Executing #{cmd}:\n")
20
+ if !system(env, cmd)
21
+ exit 1
22
+ end
23
+ end
24
+
25
+ $objs = ['rdwarf.o', 'rdwarf_names.o', 'libdwarf/libdwarf.a']
26
+
27
+ $CFLAGS += " -Ilibdwarf"
28
+
29
+ create_makefile("rdwarf/rdwarf")
@@ -0,0 +1,102 @@
1
+
2
+
3
+ -------------------------------------------------------------
4
+ April 14, 2000 davea@sgi.com
5
+ Corrected minor bugs in production of 32bit dwarf with
6
+ 64 bit pointers. Fixed omissions in legal
7
+ DIE children of a DIE. Make small changes in
8
+ description of regster output in frame information
9
+ access.
10
+
11
+ -------------------------------------------------------------
12
+ Mar 7, 2000 davea@sgi.com
13
+ Corrected line table reading so it will handle
14
+ reading an object with a diffent number of standard
15
+ op codes than at libdwarf compile time.
16
+ This was possible all along, but libdwarf did
17
+ not do it right.
18
+
19
+ -------------------------------------------------------------
20
+ Dec 8, 1999 davea@sgi.com
21
+ Changed nearly all files.
22
+ Adding the capability to read and produce
23
+ the new, accepted by committee, but not
24
+ released-publically 64bit extension proposal
25
+ dwarf data.
26
+ This allows dwarf compilation units
27
+ with 64bit section offsets and 32bit
28
+ sections offsets to be mixed.
29
+ So that offsets can grow very large with
30
+ 64-bit pointer applications (though 64bit pointers
31
+ and 64bit offsets are not the same notion).
32
+
33
+ In addition, removed all the contents (or nearly all)
34
+ of the dwarf_funcs.c dwarf_weaks.c dwarf_vars.c,
35
+ and dwarf_types.c, as the data format is identical
36
+ to dwarf globals (pubnames) and there is no need
37
+ to duplicate all that code.
38
+
39
+ All these sections whose contents were gutted are things that
40
+ are formatted exactly like pubnames, and all are sgi
41
+ extensions. Now the implementation uses pubnames code
42
+ (dwarf_global.c) to do the work for all the pubnames-like
43
+ sections.
44
+
45
+ The (minor, IMO) difference is that in case of an incorrect
46
+ dwarf file (leading to libdwarf being unable to process
47
+ something in one of the sgi-specific pubnames-like sections)
48
+ the dwarf error string may reference pubnames when weaks,
49
+ static functions, static variables, or global typenames are
50
+ actually the problem. This is fixable, however the price would
51
+ appear to be that even globals would need to call a helper
52
+ function (to pass in the correct error return). Right now the
53
+ dwarf_weaks.c calls the dwarf_global.c function, for example,
54
+ with no extra arguments indicating the true section involved.
55
+ (Other approaches keeping the original error codes exist.
56
+ Producing the code uniquely via macros seems unappealing.
57
+ Inline functions would be ok though. This version does not
58
+ inline the functions we are talking about, such as
59
+ dwarf_global_name_offsets() when called from
60
+ dwarf_type_name_offsets().)
61
+
62
+ Since these extra sections are SGI only and only really used by
63
+ SGI's workshop product, and the performance hit is small, the
64
+ extra function calls in reading each seem acceptable.
65
+
66
+
67
+ -------------------------------------------------------------
68
+ Sep 29,1999 davea@sgi.com
69
+ Changed many files, so that it is easy to switch
70
+ from 32bit-offset-only (like cygnus
71
+ and dwarf2 v 2.0.0) to sgi/mips 64 bit dwarf.
72
+ See NEWS for more info on 32bit-offset.
73
+
74
+
75
+ -------------------------------------------------------------
76
+ Since Oct 95 and before May, 1996
77
+
78
+ Added the function dwarf_get_cie_of_fde() which makes it possible
79
+ to remember a single fde/cie set out of a block usefully.
80
+
81
+ Enhanced doc of dwarf_bitoffset()
82
+
83
+ Added new function dwarf_global_formref() so all reference
84
+ forms can be retrieved.
85
+
86
+ Fixed bug in retrieving array bounds: was failing to sign extend
87
+ formsdata.
88
+
89
+ Added function dwarf_get_fde_info_for_all_regs(), which makes
90
+ retrieval of the complete set of registers (as needed by
91
+ debuggers and exception handlers) effectively N times faster
92
+ than getting them one a time where N is the number of registers.
93
+
94
+ Added support for exception table handling (really just support
95
+ for a reference to an exception table for c++ exceptions).
96
+
97
+ Fixed a bug where useless extra space (several megabytes)
98
+ were malloc'ed for the abbreviations table by the libdwarf
99
+ consumer code.
100
+
101
+ davea@sgi.com
102
+ -------------------------------------------------------------
@@ -0,0 +1,71 @@
1
+ This document is a brief description of the main
2
+ coding style conventions in libdwarf. Many of them
3
+ will be obvious from the code, but over time some
4
+ accidental diffences crept in.
5
+
6
+ Code should be indented in multiples of 4 spaces, and
7
+ tabs should not be used to indent the source code.
8
+ Use the dicheck program to check indenting.
9
+
10
+ dwarf.h and libdwarf.h must have all arguments commented
11
+ out as these are public headers. Because a prototype like
12
+ int dwarf_example_prototype(Dwarf_Debug foo);
13
+ would be made unusable by a legitimate
14
+ preprocessor definition
15
+ such as #define foo +
16
+
17
+ The struct naming convention is 'struct Camel_Caps_s' for the
18
+ struct and 'Camel_Caps' for any typedef for the struct.
19
+ Admittedly having both camel caps
20
+ and an underbar is an unusual convention, but it is
21
+ the way the coding was begun in the early 1990's and
22
+ we should remain consistent now.
23
+
24
+ All user-referenceable data and functions
25
+ and user_visible types should begin with DW_ or
26
+ dwarf_. Non-static libdwarf global data and functions
27
+ should begin with _dwarf (a somewhat questionable
28
+ approach, but workable).
29
+
30
+ Function names should be all lower case with underbars
31
+ for readability.
32
+
33
+ There should never be static data in any function.
34
+ Nor should there ever be static data outside of libdwarf
35
+ functions. libdwarf can be called from multiple threads
36
+ (but only from one thread per Dwarf_Debug) and multiple
37
+ Dwarf_Debug objects can be open at one time.
38
+ Instead place such data per-dbg into the Dwarf_Debug structure
39
+ in dwarf_opaque.h. Similarly for the producer code.
40
+
41
+ Function-local variables should be lower-case with
42
+ underbars for readability. It's ok for a small loop
43
+ with counters to use single letter names like i or k or m.
44
+
45
+ structure members should have a struct-specific
46
+ 2-character prefix to the name (followed by
47
+ an underbar). That makes it much
48
+ easier to grep for uses of members.
49
+
50
+ Try to keep lines under 80 characters in length.
51
+
52
+ Ensure every if() has {} to enclose the actions.
53
+
54
+ There is a slight preference for if<single space>(
55
+ over if(. Similarly with for (, while (, and switch (.
56
+ Not obsessing about these space-issues...
57
+
58
+ Use libdwarf.h types for all the data objects you define,
59
+ though sometimes an 'unsigned' or 'int' or 'size_t' is
60
+ ok in restricted circumstances. Dwarf_Unsigned Dwarf_Signed
61
+ are the preferred integer types for general use.
62
+
63
+ No .c file should ever have an 'extern *' to access some external.
64
+ Instead, such external references should be defined in a header file
65
+ and every .c with a reference to the external should #include
66
+ the relevant header. Being obsessive about this ensures that when
67
+ the definition changes it will match the function declaration.
68
+ There are a couple violations of this as of 2012, and those
69
+ should be fixed!
70
+
71
+ ------------
@@ -0,0 +1,28 @@
1
+
2
+
3
+ The files:
4
+ libdwarf.h
5
+ dwarf.h
6
+ and all the .h and .c files in this implementation of
7
+ libdwarf are copyrighted according to the file
8
+ LIBDWARFCOPYRIGHT (which mentions the LGPL version 2.1).
9
+ Each file mentions the LGPL.
10
+ The full text of the LGPL 2.1 is provided in LGPL.txt
11
+
12
+ The libdwarf documentation:
13
+ libdwarf2.1.mm
14
+ is based on material submitted to the UI PLSIG as proposed
15
+ interfaces for dwarf, but completely rewritten.
16
+ Copyright ownership is therefore SGI (but see the document for details)
17
+ and it seems clear that the intent was there was to be free
18
+ copying with no fees.
19
+
20
+ libdwarf2p.1.mm
21
+ is documentation of a set of interfaces
22
+ (not part of the UI PLSIG proposals)
23
+ and the document was written from scratch at SGI.
24
+ Copyright ownership is therefore SGI (but see the document for details)
25
+ and it seems clear that the intent was there was to be free
26
+ copying with no fees.
27
+
28
+ 17 March 2014:Updated to remove reference to dwarf.v2.mm.
@@ -0,0 +1,619 @@
1
+ 2015-11-15 David Anderson
2
+ * Makefile.in,configure.in: These now support building in separate clean directory.
3
+ * configure: Regenerated.
4
+ 2015-11-11 David Anderson
5
+ * dwarf_opaque.h: Delete two useless blank lines.
6
+ 2015-11-09 David Anderson
7
+ * libdwarf.h.in: Removed unimplemented function
8
+ declarationfrom the file.
9
+ * libdwarf2.1.mm: Updated with new interface functions
10
+ for DWARF5 and split dwarf. Version2.33
11
+ * libdwarf2.1.mm: Regenerated.
12
+ 2015-11-08 David Anderson
13
+ * dwarf_alloc.c: Fixed indents, trailing whitespace.
14
+ * dwarf_loc2.c: Fixed indents, trailing whitespace.
15
+ * dwarf_form.c: Made too-long line into 2 lines.
16
+ * dwarf_loc.h: Removed duplicate Dwarf_Loc_c_s etc declarations.
17
+ * dwarf_util.c(_dwarf_error_mv_s_to_t),dwarf_util.h: New
18
+ function to eliminate duplicative code.:
19
+ * dwarf_query.c): Fix bug in dwarf_get_offset_size().
20
+ Use new _dwarf_error_mv_s_to_t() to get error on correct dbg.
21
+ Fixed indents, trailing whitespace.
22
+ * dwarf_ranges.c: Use new _dwarf_error_mv_s_to_t()
23
+ to get error on correct dbg.
24
+ Fixed indents, trailing whitespace.
25
+ 2015-11-07 David Anderson
26
+ * dwarf_alloc.c: Added new checks so user mixing up
27
+ tied dbg with regular dbg won't lead to crashes
28
+ when calling dwarf_dealloc or dwarf_finish().
29
+ Zeroed out some fields to recognize space deallocated.
30
+ * dwarf_die_deliv.c: Added support of split dwarf
31
+ DW_AT_[GNU_]ranges_base
32
+ * dwarf_form.c: Load string from tieddbg when appropriate.
33
+ * dwarf_harmless.c: On free() zero out a field to show that was done.
34
+ * dwarf_loc.c: Correct the handling of split dwarf loclist.
35
+ * dwarf_opaque.h: Add cc_ranges_base_present for split dwarf.
36
+ Add _dwarf_get_ranges_base_attr_from_tied() for split dwarf.
37
+ * dwarf_query.c: Get and remember skeleton compilaton unit
38
+ DW_AT_[GNU_]ranges_base from tied objects for split dwarf.
39
+ * dwarf_ranges.c: If a tied object present, look for ranges
40
+ there, not in split dwarf object.
41
+ * dwarf_util.c: Housekeeping zeros out fields to ensure not
42
+ used after dealloc.
43
+ 2015-11-01 David Anderson
44
+ * configure.in: Added -O0 to --enable-wall.
45
+ So if a coredump while debugging gdb will work well.
46
+ * configure: Regenerated.
47
+ 2015-11-01 David Anderson
48
+ * Makefile.in: Split out dwarf_loc2 to put the DWARF5
49
+ expression code all in one place.
50
+ * dwarf_alloc.c,dwarf_alloc.h: Three new opaque
51
+ structs for DWARF5 expression interfaces.
52
+ * dwarf_error.c: New error codes for DWARF5 expression interfaces.
53
+ * dwarf_frame.c: Altered internal interfaces to support
54
+ DWARF5 expression reading.
55
+ * dwarf_loc.c: Refactored to support DWARF5 and moved
56
+ some code into dwarf_loc2.c to segregate the new
57
+ interfaces for clarity.
58
+ * dwarf_loc.h: Definitions of new library-internal structs
59
+ (opaque to callers).
60
+ * dwarf_loc2.c: Contains the new DWARF5 location expression
61
+ interface code. It is not separately compiled, it is
62
+ #included by dwarf_loc.c.
63
+ * dwarf_opaque.h: Commentary change.
64
+ * dwarf_query.c: dwarf_get_offset_size() new.
65
+ Refactored to avoid duplicating code.
66
+ * libdwarf.h.in: DWARF5 location expression interfaces
67
+ refined and commentary improved.q
68
+ 2015-10-28 David Anderson
69
+ * dwarf_loc2.c: New file with the new code for DWARF5
70
+ location expressions put here. Not separate compile,
71
+ this is brought into dwarf_loc.c via a #include there
72
+ 2015-10-26 David Anderson
73
+ * Makefile.in: Handle the configure --enable-wall option.
74
+ * configure.in: Add --enable-wall so we can easily get
75
+ gcc's -Wall option for the build.
76
+ * configure: Regenerated.
77
+ * dwarf_error.c: Amplify the text for DW_DLE_LOCLIST_INTERFACE_ERROR.
78
+ * dwarf_loc.c(_dwarf_read_loc_expr_op): Correct a sanity test
79
+ recently introduced. Ensure the location fields all set.
80
+ #if 0 some code that will be fixed with the new location
81
+ interface set.
82
+ * dwarf_loc.h: Revised the prototypes and commentary for the new
83
+ location list interfaces.
84
+ 2015-10-25 David Anderson
85
+ * checkexamples.c: Add commentary to example9.
86
+ * dwarf_alloc.c: Add DW_DLA_LOC_BLOCK_C and DW_CLA_LOCDESC_C
87
+ allocation descriptions to array.
88
+ * dwarf_alloc.h: Increase ALLOC_AREA_INDEX_TABLE_MAX to match.
89
+ * dwarf_base_types.h: Increase MAX_DW_DLA to match.
90
+ * dwarf_die_deliv.c: Switch some returns from pointer to
91
+ the standard int DW_DLV_OK etc and return pointer through
92
+ an argument. Identify which CUs are dwo by checking name
93
+ for a .dwo ending. Fix whitespace endings.
94
+ * dwarf_error.c: Add DW_DLE 309 to 311 errors to descriptions array.
95
+ * dwarf_form.c: Remove trailing whitespace. Reformat one line
96
+ so it is not so long.
97
+ * dwarf_line.c: Add {} on if for clarity.
98
+ Fix whitespace endings.
99
+ * dwarf_line_table_reader.c: Fix whitespace endings.
100
+ * dwarf_loc.c: Refactor loc. expr. reader into a
101
+ routine that reads one expression, _darf_read_loc_expr_op()..
102
+ Add DWARF5 operators.
103
+ Add preliminary dwo expression support (which will change
104
+ but this is a start). Old expression interface now
105
+ explicitly supports only DWARF 2,3,4. No DWARF5.
106
+ Add preliminary loclist_c support (it will change).
107
+ Add commentary about the old loclist interface.
108
+ * dwarf_loc.h: First cut of new interfaces (functional, not
109
+ public structs).
110
+ * dwarf_opaque.h: Add cc_is_dwo flag to cu context struct.
111
+ * libdwarf.h.in: Rework some loclist commentary.
112
+ Add first try at new loclist interfaces for DWARF2,3,4,5.
113
+ New error codes for new loclist/dwo code.
114
+ * libdwarf2.1.mm: Rev 2.32. New wording on old loclist
115
+ interfaces.
116
+ 2015-10-15 David Anderson
117
+ * dwarf_util.c,dwarf_query.c: Added DW_FORM_strp_sup as
118
+ same idea as DW_FORM_GNU_strp_alt.
119
+ 2015-10-15 David Anderson
120
+ * checkexamples.c: Fixed data type in the example code.
121
+ * dwarf.h: Updated comment about DW_FORM_GNU_strp_alt
122
+ * dwarf_elf_access.c: Fixed trailing whitespace and
123
+ removed debug printf that got left in.
124
+ * dwarf_error.c: Add new TIED file errors.
125
+ DW_DLE_NO_TIED_FILE_AVAILABLE, DW_DLE_NO_TIED_STRING_AVAILABLE.
126
+ * dwarf_form.c: Added support for DW_FORM_GNU_strp_alt.
127
+ * dwarf_init_finish.c: #if 0 routine all_sig8bits_zero().
128
+ * dwarf_line.c: Now always notice windows-like c: etc
129
+ as start of a full path. Ensure directories with \ are
130
+ turned to / in line tables. (for full such transforms
131
+ configure with --enable-windowspath ) Remove some debug #ifdef
132
+ lines.
133
+ Alter the linecontext interface to pass back table count,
134
+ not linecount.
135
+ * dwarf_line.h: Add commentary and lc_table_count field.
136
+ * dwarf_line_table_reader_common.c: Fix indent/trailing whitespace.
137
+ Now sets lc_table_count;
138
+ * dwarf_opaque.h: Add _dwarf_get_string_from_tied() interface.
139
+ * dwarf_print_lines.c: Remove trailing whitespace and some debug printf..
140
+ * libdwarf.h.in: New error codes. Fix trailing whitespace. Expand
141
+ commentary.
142
+ 2015-10-13 David Anderson
143
+ * dwarf_line.c: Refactored so we have only one
144
+ piece of code creating file paths from line table data.
145
+ deleted obsolete code that was #if 0.
146
+ * libdwarf.h.in: Fleshed out linecontext
147
+ versions of two-level table readng.
148
+ Revised a new interface (dwarf_srclines_b) to
149
+ make it possible to do a read of just the line header.
150
+ * libdwarf2.1.mm: Documented new functions.
151
+ Fixed the example code so it is actually correct
152
+ 2015-10-06 David Anderson
153
+ * Makefile.in: Removed source files from the build that
154
+ are only useful to IRIX and only in the context of building
155
+ an IRIX runtime system.
156
+ * dwarf_alloc.c: Added constructor/destructor code to
157
+ Dwarf_Line_Context allocator.
158
+ * dwarf_elf_access.c: Added additional #defines so we
159
+ have the IA64 defines we need to compile certain
160
+ test cases on freebsd.
161
+ * dwarf_error.c: Two new error codes for Dwarf_Line_Context
162
+ checking.
163
+ * dwarf_line_table_reader_common.c: New file. We can compile
164
+ the line reading with and without detailed print lines
165
+ for dwarfdump. Now only one body of line reading code
166
+ to maintain.
167
+ * dwarf_line.c: Moved code out to dwarf_line_table_reader_common.c
168
+ Refactored to support skeleton line tables (DWARF5)
169
+ Eliminated an internal struct, it is no longer needed.
170
+ a little better.
171
+ Supports experimental two-level line tables too.
172
+ * dwarf_print_lines.c: Uses dwarf_line_table_reader_common.c
173
+ to do much of its work now.
174
+ * libdwarf.h.in: New interfaces for nicer access to
175
+ line table headers.
176
+ * libdwarf2.1.mm: Partial documentation of the new
177
+ libdwarf line table interfaces.
178
+ 2015-10-01 David Anderson
179
+ * dwarf_global.h: Now the last __sgi related macro (else, endif)
180
+ have /* __sgi */.
181
+ 2015-09-30 David Anderson
182
+ * dwarf_global.c,dwarf_line.c,dwarf_line.h,dwarf_line2.c,
183
+ dwarf_line_table_reader_common.c,dwarf_sort_line.c,libdwarf.h.in:
184
+ The SGI IRIX only fields in dwarf_line.h ifdef __sgi now.
185
+ And all code referencing them that way too. Balancing
186
+ #endif has /* __sgi */ now for searchability.
187
+ Functions only usable on SGI IRIX only compiled in if __sgi
188
+ macro defined.
189
+ * libdwarf2.1.mm: Added a comment related to experimental
190
+ two-level line tables.
191
+
192
+ 2015-09-29 David Anderson
193
+ * dwarf_die_deliv.c,dwarf_line.c,dwarf_print_lines.c: Now looks for
194
+ and adds the extra offset from debug_fission: DW_SECT_LINE.
195
+ 2015-09-29 David Anderson
196
+ * dwarf_line.c,dwarf_line.h,dwarf_line_table_reader_common.c,
197
+ dwarf_print_lines.c: Moved the prefix reading subroutine
198
+ into common so the prefix-printing can have
199
+ print code added (with ifdef so production does not
200
+ have it).
201
+ 2015-09-29 David Anderson
202
+ * dwarf_line.c,dwarf_line_table_reader_common.c,dwarf_print_lines.c,
203
+ dwarf_line.h,dwarf_line2.c,libdwarf.h.in:
204
+ Moved some code from dwarf_line_table_reader_common.c to dwarf_line.c.
205
+ Fixed indent and trailing whitespace. Fixed the 'section offset'
206
+ code by using the proper value from dss_ptr..
207
+ 2015-09-28 David Anderson
208
+ * dwarf_line_table_reader_common.c: New file is the line table reader
209
+ extracted from dwarf_line.c. Now compiled into dwarf_line.c
210
+ and dwarf_print_lines.c with correct two-level line table
211
+ calculations. No more coding the table twice.
212
+ * dwarf_line.c,dwarf_print_lines.c: Now #include
213
+ dwarf_line_table_reader_common.c
214
+ * Makefile.in: Reflects new source depedencies.
215
+ * dwarf_line2.c: An internal function interface changed,
216
+ so accomodated it here.
217
+ * libdwarf.h.in, dwarf_error.c: New error code, DW_DLE_BAD_LINE_TABLE_OPERATION.
218
+ Changes not staged for commit:
219
+ (use "git add <file>..." to update what will be committed)
220
+ (use "git checkout -- <file>..." to discard changes in working directory)
221
+
222
+ modified: Makefile.in
223
+ modified: dwarf_error.c
224
+ modified: dwarf_line.c
225
+ modified: dwarf_line2.c
226
+ modified: dwarf_line_table_reader_common.c
227
+ modified: dwarf_print_lines.c
228
+ modified: libdwarf.h.in
229
+
230
+ 2015-09-28 David Anderson
231
+ * dwarf_line.c,dwarf_line.h,dwarf_print_lines.c: made li_ and lr_
232
+ line register structs agree on spelling of suffix of each name.
233
+ Now dwarf_srclines (and two-level) use the
234
+ line register struct instead of a list of local variables.
235
+ 2015-09-26 David Anderson
236
+ * dwarf_elf_access.c: Removed some trailing spaces.
237
+ * dwarf_line.c: Update the li_is_actuals_table (new field)
238
+ where a new line is emitted. For later safe dealloc.
239
+ Fixed indents and removed trailing spaces.
240
+ Fixed the dwarf_srclines_dealloc to work properly on
241
+ all the line table variations.
242
+ * dwarf_line.h: Removed trailing spaces.
243
+ Added li_is_actuals_table so the dealloc can work properly.
244
+ * dwarf_print_lines.c: Fixed the Logicals and Actuals table
245
+ formatting, Now prints the subprograms table too.
246
+ * libdwarf.h.in: Added dwarf_get_LNCT_name() to function list.
247
+ 2015-09-25 David Anderson
248
+ * dwarf_print_lines.c: A first cut at detailed line tables.
249
+ Not yet computing state register values for all two-level
250
+ line tables here.
251
+ 2015-09-25 David Anderson
252
+ * dwarf_line.h: added a comment.
253
+ * dwarf_print_lines.c: Now finds actuals and logicals
254
+ tables and prints them. Incomplete but perhaps useful.
255
+ 2015-09-24 David Anderson
256
+ * dwarf_line.c: Renamed a local var for clarity. Added commentary
257
+ for clarity. Fixed a memory leak for skeleton lined tables.
258
+ Added required free() calls on error to avoid memory leaks.
259
+ Moved an 'overrun' check into a loop to check on every
260
+ loop iteration.
261
+ * dwarf_line.h: Added commentary.
262
+ 2015-09-23 David Anderson
263
+ * dwarf_abbref.c,dwarf_die_deliv.c,dwarf_init_finish.c,dwarf_query.c: Removed
264
+ unused local variables.
265
+ * dwarf_line.c: Corrected bugs in the two-level line table
266
+ support and improved error checking.
267
+ Revamped the line table header reading code for clarity.
268
+ See dw-linetableheader.txt .
269
+ * dw-linetableheader.txt: The line table headers are a bit
270
+ complicated (mostly by the experimental two-level
271
+ line table support) so this file shows the header fields
272
+ in order by version.
273
+ * dwarf_form.c: Fixed nested comment, removed unused local variables..
274
+ * dwarf_loc.c: Cast return from _dwarf_get_alloc() to remove
275
+ a compile warning.
276
+ * dwarf_tied.c: Removed unused local variable.
277
+ * dwarf_xu_index.c: Removed unused local variables.
278
+ 2015-09-22 David Anderson
279
+ * libdwarf/dwarf.h,dwarf_elf_access.c,dwarf_form.c,dwarf_line.h:
280
+ Fixed indentation errors.
281
+ * dwarf_line.c: Fixed indentation and corrected an error
282
+ introduced a couple days ago.
283
+ 2015-09-19 David Anderson
284
+ * dwarf.h: Adding commentary. a DW_LNS for two-level line tables
285
+ looks wrong..
286
+ * dwarf_die_deliv.c: Adding commentary.
287
+ * dwarf_line.c: An internal function now has a leading _
288
+ and a context argument.. Added
289
+ local names of popular pointers.
290
+ * dwarf_print_lines.c,dwarf_sort_line.c: An internal
291
+ function now has a leading _ and a context argument..
292
+ * dwarf_opaque.h: Added cc_segment_selector_size to contex structure.
293
+ * libdwarf.h.in: Added commentary on two-level line table functions etc.
294
+ 2015-09-17 David Anderson
295
+ * dwarf.h, dwarf_alloc.c,dwarf_base_types.h,dwarf_init_finish.c,
296
+ dwarf_line.c,dwarf_line.h,dwarf_line2.c,dwarf_util.c,libdwarf.h.in:
297
+ Adding support for experimental 2-level line table.
298
+ 2015-09-15 David Anderson
299
+ * dwarf_form.c(_dwarf_extract_string_offset_via_str_offsets):
300
+ Modified comment to reflect the current DWARF5 draft (we need not
301
+ guess about correctness).
302
+ 2015-09-15 David Anderson
303
+ * dwarf_query.c, dwarf_form.c: We were failing
304
+ check for off-end-of debug_str_offsets section correctly
305
+ and had a dwarf_dealloc where it was not wanted.
306
+ 2015-09-15 David Anderson
307
+ * dwarf_query.c(_dwarf_extract_address_from_debug_addr): At line 540
308
+ we were deleting a dwarf_error that might not be there.
309
+ Now conditional on DW_DLV_ERROR. This and around line 605
310
+ are the very rare situation we can turn one error code off
311
+ and possibly or definitely substitute another error.
312
+ Normally we just return the original error as the
313
+ 'lowest level error.'
314
+ 2015-09-15 David Anderson
315
+ * dwarf_elf_access.c: Added conditional
316
+ R_MIPS_64 and R_MIPS_TLS_TPREL64 defines
317
+ as the headers I have for freebsd 32bit VM
318
+ do not define those and we need them for
319
+ testinga couple object files.
320
+ 2015-09-15 Carlos Alberto Enciso
321
+ * dwarf_elf_access.c: For Windows version,
322
+ some compilers generate
323
+ EM_PPC64 elf type, but the generated code is 32 bits.
324
+ Set the correct
325
+ value for 'dbg->de_pointer_size'.
326
+ * dwarf_init_finish.c: For Windows version,
327
+ remove the incorrect hard
328
+ code value for 'dbg->de_pointer_size'.
329
+ * dwgetopt.h: Add the guard 'extern "C"'.
330
+ 2015-09-15 David Anderson and Carlos Alberto Enciso
331
+ * dwarf_form.c (dwarf_formsig8_const): Was failing to
332
+ return its return code.
333
+ * dwarf_xu_index.c (_dwarf_search_fission_for_offset): Was
334
+ failing to return its return code.
335
+ 2015-09-14 David Anderson
336
+ * dwarf_form.c,dwarf_global.c,dwarf_line.c,dwarf_macro.c,dwarf_util.c:
337
+ Fixed indents and removed trailing whitespace.
338
+ 2015-09-14 David Anderson
339
+ * libdwarf2.1.mm: Revision 2.30. Fixed awkward
340
+ line in UTF-8 section.
341
+ * libdwarf2.1.pdf: Regenerated
342
+ 2015-09-14 David Anderson
343
+ * libdwarf2.1.mm: Revision 2.29. Added text
344
+ to Items Changed section. Added a top level
345
+ UTF-8 strings section.
346
+ * libdwarf2.1.pdf: Regenerated
347
+ 2015-09-14 David Anderson
348
+ * libdwarf2.1.mm: Revision 2.28. Now describes
349
+ dwarf_set_tied_dbg().
350
+ * libdwarf2.1.pdf: Regenerated
351
+ 2015-09-13 David Anderson
352
+ * libdwarf.h.in,dwarf_error.c: New error code for
353
+ improved string checking.
354
+ * dwarf_form.c,dwarf_string.c:Now call the string checker
355
+ on all strings and do a more thorough check.
356
+ * dwarf_util.c, dwarf_util.h: Revised the interfaces to the
357
+ string checker to make it more useful and accurate.
358
+ 2015-09-12 David Anderson
359
+ * dwarf_die_deliv.c,dwarf_form.c,dwarf_opaque.h,
360
+ dwarf_original_elf_init.c,dwarf_query.c,dwarf_tied.c:
361
+ Now we can find addresses in the base from the dwp.
362
+ 2015-09-11 David Anderson
363
+ * Makefile.in: clean now removes test executable ./dwarftied
364
+ * dwarf.h: Adding DW_AT_GNU_macros attribute, 0x2119.
365
+ 2015-09-11 David Anderson
366
+ * dwarf.h: Adding DW_AT_GNU_discriminator attribute, 0x2136.
367
+ 2015-09-11 David Anderson
368
+ * Makefile.in,dwarf_alloc.c,dwarf_die_deliv.c,dwarf_error.c,dwarf_form.c,
369
+ dwarf_opaque.h,dwarf_original_elf_init.c,dwarf_query.ckdwarf_tied.c,
370
+ libdwarf.h.in: Added dwarf_tied.c and -x tied= options. So libdwarf
371
+ can follow DW_FORM_addrx to get the address from another object.
372
+ 2015-09-05 David Anderson
373
+ * dwarf.h: Fixed indentation of two lines with the 0x
374
+ values incorrectly indented.
375
+ 2015-07-12 David Anderson
376
+ * dwarf_init_finish.c: Added commentary about .rela
377
+ * dwgetopt.c,dwgetopt.h,dwgetopttest.c: Use dwoptind dwoptarg etc,
378
+ not optind, optarg, optopt opeerror etc.
379
+ * gennames.h: use dwoptarg dwoptind, not optarg, optind.
380
+ 2015-05-08 David Anderson
381
+ * dwarf_die_deliv.c, dwarf_frame2.c, dwarf_frame2.c,
382
+ dwarf_frame.c: The debugging-only #if 0 now have comments
383
+ so grep for 'if 0' is not alarming.
384
+ * dwgetopt.c,pro_forms.c,pro_section.c: Removed unused code
385
+ bracketed with '#if 0'.
386
+ 2015-05-01 David Anderson
387
+ * dwarf.h: Added DW_DEFAULTED* and DW_IDX* DWARF5 macros.
388
+ * dwarf_abbrev.c: Expanded comments about the interface
389
+ used by dwarfdump -a.
390
+ It is NOT guaranteed to work on all objects.
391
+ It continues to work usefully on a plain .o .
392
+ * dwarf_alloc.h: Added code to clean when there
393
+ are fission package file sections .debug_cu_index or
394
+ .debug_tu_index.
395
+ * dwarf_die_deliv.c: Significant changes to internals to support
396
+ DWARF5 debug fission dwp package objects.
397
+ Added dwarf_die_from_hash_signature() which lets one
398
+ find DWP DIE information from a hash signature.
399
+ * dwarf_error.c: Fifteen new DW_DLE* error messages added related
400
+ to new DWARF5 sections and to debug fission package files.
401
+ * dwarf_form.c: New commentary about offsets rrelated to
402
+ DWP package files. New interface dwarf_formsig8_const()
403
+ to read the DW_FORM_data8 a DW_AT_dwo_id uses.
404
+ * dwarf_global.c: Added commentary about an old interface
405
+ and DWARF5 (the old interface does not support DWARF5,
406
+ newer (but not new) interfaces do).
407
+ * dwarf_incl.h: Add dwarf_xu_index.h include.
408
+ * dwarf_init_finish.c: Removed a couple dwo-section
409
+ readers (they were not real) Added new DWARF5
410
+ section readers and the appropriate .dwo section readers.
411
+ * dwarf_line.c,dwarf_loc.c: Added support for getting the correct line
412
+ * dwarf_macro.c: Added comment that .debug_macinfo
413
+ section not supported in DWP
414
+ Package File (and .debug_macinfo is not in DWARF5).
415
+ section offset in a DWP package file.
416
+ * dwarf_opaque.h: Many New fields for the new sections
417
+ and DWP Package File support.
418
+ Various new functions (libdwarf internal) for the
419
+ new sections.
420
+ * dwarf_query.c: Added support for DWP Package File offsets.
421
+ * dwarf_tsearch.h: Added ifndef DWARF_TSEARCH so #include
422
+ more than once does not lead to difficulty.
423
+ * dwarf_util.c: Added support for DWP Package File data.
424
+ * dwarf_xu_index.c: Added support for DWP Package File data
425
+ so it can all be read properly.
426
+ * dwarf_xu_index.h: Added ifndef DWARF_XU_INDEX_H so #include
427
+ more than once does not lead to difficulty.
428
+ * libdwarf.h.in: Added dwarf_get_IDX_name() and
429
+ dwarf_get_IDX_name(). Added fifteen new DW_DLE error codes.
430
+ New function dwarf_die_from_hash_signature().
431
+ * libdwarf2.1.mm: Rev 2.27. Documented interfaces
432
+ dwarf_next_cu_header_d(),dwarf_die_from_hash_signature(),
433
+ dwarf_get_debugfission_for_die(),dwarf_get_debugfission_for_key().
434
+ * libdwarf2.1.pdf: Regenerated.
435
+ 2015-04-23 David Anderson
436
+ * dwarf.h: Delete spurious blank lines.
437
+ * dwarf_base_types.h: New defines. DW_CIE_VERSION* DW_CU_VERSION**
438
+ DW_ARANGES_VERSION* DW_LINE_VERSION* DW_LOC_VERSION*
439
+ DW_LINE_STR_VERSION5, DW_MACRO_VERSION5,
440
+ DW_LINE_LOC, DW_NAMES_VERSION5, DW_PUBNAMES_VERSION*,
441
+ DW_PUBTYPES_VERSION*, DW_STR_OFFSETS_VERSION5,
442
+ DW_SUP_VERSION*, DW_CU_INDEX_VERSION5,
443
+ DW_TU_INDEX_VERSION5, making version comparisons
444
+ more precise and including DWARF5.
445
+ * dwarf_arange.c: CURRENT_VERSION_STAMP -> DW_ARANGES_VERSION2
446
+ * dwarf_die_deliv.c,dwarf_global.c,dwarf_line.c, : Use the new
447
+ DW_*_VERSION* version names.
448
+ * dwarf_init_finish.c: Added to 3 comments.
449
+ * dwarf_loc.c: Use the new DW_*_VERSION* version names.
450
+ Use a local variable to simpify some comparisons
451
+ for readability.
452
+ * dwarf_opaque.h: Update the comments about version numbers.
453
+ Added new comments foreshadowing changes for DebugFission
454
+ and DWP. REMOVE CURRENT_VERSION_STAMP* macros as they
455
+ are no longer used.
456
+ 2015-03-10 David Anderson
457
+ * dwgetopt.c: Was mishandling options
458
+ missing their required argument.
459
+ 2015-03-09 David Anderson
460
+ * dwgetopt.c: Fixed a bug in handling options.
461
+ See dwarfdump build for testing code
462
+ and test runs for dwgetopt.c
463
+ 2015-02-22 David Anderson
464
+ * dwgetopt.h, dwgetopt.c: Copied from dwarfdump so
465
+ libdwarf can compile without dwarfdump source present.
466
+ * Makefile.in: Builds dwgetopt.o
467
+ * gennames.c: Now uses dwgetopt.o
468
+ 2015-02-12 David Anderson
469
+ * dwarf_original_elf_init.c(dwarf_elf_init_file_ownership):
470
+ When dwarf_elf_object_access_init() returns DW_DLV_ERROR
471
+ the Dwarf_Error was not getting set. Now it is set.
472
+ 2015-02-04 David Anderson
473
+ * dwarf.h: Added new TAGs etc from DWARF5. Since DWARF5 is
474
+ not a completed standard these new things could change.
475
+ * dwarf_die_deliv.c: Refactored calculation of end_of CU
476
+ to ensure uniformity. Added checks to catch attempts
477
+ to read past end and coredump (can happen when the DWARF is
478
+ erroneous). Notice when bogus attribute wraps memory
479
+ so the next DIE would be at an earlier address in memory
480
+ than the current die (DW_DLE_NEXT_DIE_LOW_ERROR).
481
+ * dwarf_error.c: DW_DLE_NEXT_DIE_LOW_ERROR error code added.
482
+ * dwarf_form.c: Added check to ensure we do not run off the
483
+ end of the string section (.debug_str).
484
+ * dwarf_opaque.h: Declare new internal
485
+ function _dwarf_calculate_section_end_ptr().
486
+ * dwarf_query.c(dwarf_attrlist):
487
+ A little bit of refactoring/reordering done to catch
488
+ errors.
489
+ Created new function _dwarf_calculate_section_end_ptr().
490
+ * dwarf_xu_index.c: Removed trailing space, one line..
491
+ * libdwarf.h.in: Added define of DW_DLE_NEXT_DIE_LOW_ERROR.
492
+ 2015-01-31 David Anderson
493
+ * Makefile.in,common.c,common.h,dwarf_abbrev.c,dwarf_abbrev.h,
494
+ dwarf_addr_finder.c,dwarf_alloc.c,dwarf_alloc.h,dwarf_arange.c,
495
+ dwarf_arange.h,dwarf_base_types.h,dwarf_die_deliv.c,dwarf_die_deliv.h,
496
+ dwarf_elf_access.c,dwarf_elf_access.h,dwarf_error.h,dwarf_form.c,
497
+ dwarf_frame.c,dwarf_frame.h,dwarf_frame2.c,dwarf_frame3.c,dwarf_funcs.c,
498
+ dwarf_funcs.h,dwarf_gdbindex.c,dwarf_global.c,dwarf_global.h,
499
+ dwarf_incl.h,dwarf_leb.c,dwarf_line.c,dwarf_line.h,dwarf_line2.c,
500
+ dwarf_loc.c,dwarf_loc.h,dwarf_macro.c,dwarf_macro.h,
501
+ dwarf_opaque.h,dwarf_original_elf_init.c,dwarf_print_lines.c,
502
+ dwarf_pubtypes.c,dwarf_query.c,dwarf_ranges.c,dwarf_reloc_arm.h:
503
+ Removed obsolete postal address and oss.sgi.com address
504
+ from copyright.
505
+
506
+ 2015-01-30 David Anderson
507
+ * dwarf_init_finish.c: Now uses Dwarf_Sig8 for .debug_cu_index.
508
+ * dwarf_opaque.h: Use Dwarf_Sig8 for the dfp_hash field.
509
+ * libdwarf.h.in: dwarf_get_xu_hash_entry() uses Dwarf_Sig8 now.
510
+ 2015-01-30 David Anderson
511
+ * dwarf.h: Adding some DWARF5 defines.
512
+ Use with caution: DWARF5 is not yet final.
513
+ * gennames.c: Local array needed to be bigger
514
+ due to a longer attribute list.
515
+ 2015-01-28 David Anderson
516
+ * libdwarf2.1.mm: Fixed .H 2 to .H 3 on
517
+ dwarf_get_TAG_name etc.
518
+ Removed duplication of 3 lines of
519
+ Global Namespace operations.
520
+ Added doc of dwarf_dwarf_get_debug_str_index()
521
+ and fixed a level 2 header (starting the quoted
522
+ string with a period caused trouble in the
523
+ output).
524
+ * libdwarf2.1.pdf. Regenerated. Version 2.25.
525
+ 2015-01-25 David Anderson
526
+ * dwarf_form.c(dwarf_convert_to_global_offset): Removed
527
+ yesterday's change. The cu_context offset value
528
+ already has debugfission offset built in.
529
+ 2015-01-24 David Anderson
530
+ * dwarf_form.c: dwarf_convert_to_global_offset() was not
531
+ accounting for debugfission data (dwp).
532
+ * dwarf_die_deliv.c(dwarf_offdie_b): Was not adding
533
+ cc_extension_size into cu header offset (cc_extension_size
534
+ is rarely non-zero, but its omission was a bug here).
535
+ * dwarf_util.h: Improved a line of commentary.
536
+ 2015-01-21 David Anderson
537
+ * Makefile.in: Now with separate dwarf_names.h and dwarf_names.c
538
+ rules so parallel make works properly.
539
+ * dwarf.h: Improved the comment on DW_SECT_TYPES as that
540
+ is not actually part of DWARF5 but is reserved.
541
+ * dwarf_die_deliv.c: Added dwarf_get_debugfission_for_die().
542
+ Now dwarfdump and other clients can access
543
+ and print fission data for a specific CU easily.
544
+ * dwarf_init_finish.c(load_debugfission_tables): Deleted
545
+ unused local variable.
546
+ * dwarf_opaque.h: Now uses libdwarf.h DW_FISSION_SECT_COUNT
547
+ for clarity (libdwarf-only name).
548
+ * libdwarf.h.in: Add DW_DLE_FISSION_VERSION_ERROR as part
549
+ of error checking. Add prototype for
550
+ dwarf_get_debugfission_for_die() and declare its struct argument.
551
+ 2015-01-18 David Anderson
552
+ * dwarf_abbrev.c: Added comment, debugfission not supported
553
+ in the non-cu-specific interface.
554
+ * dwarf_alloc.c, dwarf_base_types.h: Add DW_DLA_FISSION_PERCU support.
555
+ * dwarf_die_deliv.c: Added _dwarf_get_fission_addition_die()
556
+ and _dwarf_get_fission_addition() for debugfission support.
557
+ * dwarf_error.c: Add DW_DLE_FISSION_INDEX_WRONG error string.
558
+ * dwarf_form.c: Add debugfission support for str_offsets.
559
+ * dwarf_init_finish.c: Load debugfission tables if such exist
560
+ in an object.
561
+ * dwarf_line.c: Add debugfission support for .debug_line.dwo
562
+ * dwarf_loc.c: Add debugfission support for .debug_loc.dwo
563
+ * dwarf_macro.c: Add comment that debugfission not supported
564
+ in the non-CU-specific interface.
565
+ * dwarf_opaque.h: Add structures for debugfission:
566
+ Dwarf_Fission_Offsets_s,Dwarf_Fission_Per_CU_s,
567
+ Dwarf_Fission_Section_Offset_s.
568
+ declare the new functions in dwarf_die_deliv.c
569
+ * dwarf_util.c: Remove a few lines of traling whitespace.
570
+ * dwarf_uxu_index.c: Correct bogus formatting.
571
+ * libdwarf.h.in: Add DW_DLE_FISSION_INDEX_WRONG .
572
+ 2015-01-12 David Anderson
573
+ * dwarf_init_finish.c(_dwarf_setup): Move freeresult
574
+ declaration before statements.
575
+ * dwarf_util.c: Add comments about va_end().
576
+ 2015-01-11 David Anderson
577
+ * dwarf_init_finish.c(_dwarf_setup): For all returns
578
+ in _dwarf_setup() free the sections malloc space.
579
+ 2015-01-08 David Anderson
580
+ * cmplrs/dwarf_addr_finder.h: Fix a comment and remove a trailing
581
+ whitespace.
582
+ * dwarf.h: Blank line added accidentally.
583
+ * dwarf_alloc.c: Removed trailing whitespace.
584
+ * dwarf_init_finish.c: Remove trailing whitespace. Fix indent.
585
+ * dwarf_leb.c: Remove trailing whitespace. Fix indent.
586
+ * dwarf_line.h: Fix macro backslash location, lining things up.
587
+ * dwarf_util.c: Remove trailing whitespace.
588
+ 2015-01-06 David Anderson
589
+ * dwarf_alloc.c, dwarf_base_types.h, dwarf_elf_access.c,
590
+ dwarf_error.c,dwarf_error.h,dwarf_form.c,dwarf_init_finish.c,
591
+ dwarf_leb.c,dwarf_query.c,pro_section.c: Fixed indents and
592
+ removed trailing whitespace.
593
+ 2015-01-06 David Anderson
594
+ * dwarf_frame.c( _dwarf_get_fde_info_for_a_pc_row): Cast
595
+ the pointer returned from _dwarf_get_alloc(), somehow
596
+ this cast was omitted.
597
+ * dwarf_alloc.c(dwarf_dealloc): Ensure a NULL
598
+ 'space' pointer input is not touched before checking
599
+ if it is set.
600
+ * dwarf_init_finish.c(_dwarf_setup): For badly formed Elf
601
+ ensure we do not use stale pointers.
602
+ 2015-01-05 David Anderson
603
+ * dwarf_original_elf_init.c(dwarf_finish): If the Dwarf_Debug is
604
+ not initialized do not use it.
605
+ 2015-01-03 David Anderson
606
+ * libdwarf2p.1.mm: Somehow dwarf_transform_to_disk_form()
607
+ was not documented. Now it is.
608
+ * libdwarf2p.1.pdf: Regenerated, version 1.38.
609
+ 2015-01-03 David Anderson
610
+ * dwarf_allo.c: Comment the allocation table base
611
+ more carefully.
612
+ * dwarf_base_types.h: Making DW_DLA defines more
613
+ readable, more consistent with other instances.
614
+ * libdwarf.h.in: Adding producer error codes.
615
+ The producer library has some places error values
616
+ are misidentified. Main effect: documentation.
617
+ * dwarf_error.c: Add the strings for the new error codes.
618
+ 2015-01-01 David Anderson
619
+ * A new year begins.