Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.435 kB
File.open('dwarf.tab', 'w') do |of|
lines = File.popen('cpp -dM /usr/include/dwarf.h', &:readlines)
['DW_AT', 'DW_FORM'].each do |type|
m = {}
lines.each do |line|
if /^#define (#{type}_\S+) (.*)/ =~ line
if m[$2]
STDERR.puts "dup...: #{line}"
next
end
m[$2] = $1
end
end
m.each do |v, k|
of.puts "DEFINE_#{type}(#{k});"
end
of.puts
end
end
Jump to Line
Something went wrong with that request. Please try again.