From 0c00cee4185643bd713403343db657ad7feb9d58 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Thu, 22 Dec 2016 13:39:37 +0800 Subject: [PATCH] If a symbol exists for a value, use it, even if it is not a pointer --- asm/dump_datazone | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/asm/dump_datazone b/asm/dump_datazone index 6946529..3879192 100755 --- a/asm/dump_datazone +++ b/asm/dump_datazone @@ -309,7 +309,8 @@ sub glom_objects { $object->{p}{$offset} = $db->{p}{src}{$addr}; $object->{d}{$offset} = undef; } else { - $object->{d}{$offset} = unpack("V",$db->{regions}->read($addr,4)); + my $val = unpack("V",$db->{regions}->read($addr,4)); + $object->{d}{$offset} = $val; } $addr += 4; $offset += 4; @@ -347,7 +348,11 @@ sub output_dot { } push @ports, sprintf("%s",$offset,$dstname); } else { - push @ports, sprintf("0x%08x",$offset,$val); + my $valname = $db->{symbols}->lookup_addr($val); + if (!defined($valname)) { + $valname = sprintf("0x%08x",$val); + } + push @ports, sprintf("%s",$offset,$valname); } } printf(" %s [label=\"%s\"]; // %i\n",