Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (19 sloc) 0.435 kB
fe922d3 @shinh Add a module to stringify dwarf constants
authored
1 File.open('dwarf.tab', 'w') do |of|
2 lines = File.popen('cpp -dM /usr/include/dwarf.h', &:readlines)
3 ['DW_AT', 'DW_FORM'].each do |type|
4 m = {}
5 lines.each do |line|
6 if /^#define (#{type}_\S+) (.*)/ =~ line
7 if m[$2]
8 STDERR.puts "dup...: #{line}"
9 next
10 end
11 m[$2] = $1
12 end
13 end
14
15 m.each do |v, k|
16 of.puts "DEFINE_#{type}(#{k});"
17 end
18 of.puts
19
20 end
21 end
Something went wrong with that request. Please try again.