From 0e3e11a699e0486f6c8a5c6efd3d96cc856fe1d7 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 2 Oct 2014 16:06:05 +0300 Subject: [PATCH] add more debug (string values) --- lib/elf/object_writer.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/elf/object_writer.rb b/lib/elf/object_writer.rb index dc00ad9b..b25b3573 100644 --- a/lib/elf/object_writer.rb +++ b/lib/elf/object_writer.rb @@ -30,8 +30,11 @@ module Elf end end end - assembler.objects.values.each do |slot| - add_symbol "#{slot.class.name}::#{slot.position.to_s(16)}" , slot.position + assembler.objects.values.each do |slot| + label = "#{slot.class.name}::#{slot.position.to_s(16)}" + label += "=#{slot}" if slot.is_a?(Symbol) or slot.is_a?(String) + label += "=#{slot.string}" if slot.is_a?(Virtual::StringConstant) + add_symbol label , slot.position end end attr_reader :text