From: "Radosław Bułat" Date: 2008-11-16T20:54:34+09:00 Subject: [ruby-core:19965] ruby "[BUG] " and backtrace of native function call - addr2line - useless info I attempt to use ruby1.9 from trunk to have fun with it or just try. But sometimes I get like this: /home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:56: [BUG] unknown type 0x22 (0xc given) ruby 1.9.0 (2008-11-14 revision 20235) [x86_64-linux] -- control frame ---------- c:0006 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :root c:0005 p:0056 s:0017 b:0017 l:000016 d:000016 METHOD /home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:56 c:0004 p:0033 s:0011 b:0011 l:000010 d:000010 METHOD /home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:79 c:0003 p:0199 s:0007 b:0007 l:000006 d:000006 TOP html2ascii.rb:31 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP --------------------------- DBG> : "/home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:56:in `root'" DBG> : "/home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:56:in `xpath'" DBG> : "/home/radarek/opt/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.0.6/lib/nokogiri/xml/node.rb:79:in `css'" DBG> : "html2ascii.rb:31:in `
'" -- backtrace of native function call (Use addr2line) -- 0x7f28e48b8661 0x7f28e47da88e 0x7f28e47da9e3 0x7f28e47dae8e 0x7f28e2af3e5e 0x7f28e48a7c4b 0x7f28e48a8d37 0x7f28e48ae7f4 0x7f28e48ae9e2 0x7f28e47dcb14 0x7f28e47de1a3 0x4009cf 0x7f28e394f466 0x4008b9 ------------------------------------------------------- As was pointed on ruby-core several months ago (by ko1) there we can use addr2line to obtain ruby native stack trace: I cd to ruby1.9 source directory and type: $ addr2line -e ./ruby1.9 0x7f28e48b8661 0x7f28e47da88e 0x7f28e47da9e3 0x7f28e47dae8e 0x7f28e2af3e5e 0x7f28e48a7c4b 0x7f28e48a8d37 0x7f28e48ae7f4 0x7f28e48ae9e2 0x7f28e47dcb14 0x7f28e47de1a3 0x4009cf 0x7f28e394f466 0x4008b9??:0 ??:0 ??:0 ??:0 ??:0 ??:0 ??:0 ??:0 ??:0 ??:0 ??:0 /home/radarek/opt/src/ruby1.9/main.c:37 ??:0 As you see I get useless info and only one function call is present. Am I doing it wrong or it's ok? Maybe should I compile ruby with special CFLAGS or other options? Any ideas? -- Pozdrawiam Rados�aw Bu�at http://radarek.jogger.pl - m�j blog