diff options
author | Andrey Ponomarenko <aponomarenko@rosalab.ru> | 2015-10-16 01:35:21 +0300 |
---|---|---|
committer | Andrey Ponomarenko <aponomarenko@rosalab.ru> | 2015-10-16 01:35:21 +0300 |
commit | 44d85d012998adc582dc60c66cd4bbe24ac17ec2 (patch) | |
tree | 9b52d0947f1ce20a1981ba36e2c3ca44790d5bf3 | |
parent | f5ee8f6ab3d0cf29cde0df3efcbf00b0a6afd9bf (diff) | |
download | abi-dumper-44d85d012998adc582dc60c66cd4bbe24ac17ec2.tar.gz |
Fixed detection of methods accessibility in a structure.
-rw-r--r-- | abi-dumper.pl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/abi-dumper.pl b/abi-dumper.pl index f94c796..7cbc6b9 100644 --- a/abi-dumper.pl +++ b/abi-dumper.pl @@ -1632,6 +1632,7 @@ sub read_Vtables($) if($TypeInfo{$Tid}{"Type"}=~/\A(Struct|Class)\Z/) { my $TName = $TypeInfo{$Tid}{"Name"}; + $TName=~s/\bstruct //g; if(defined $VirtualTable{$TName}) { %{$TypeInfo{$Tid}{"VTable"}} = %{$VirtualTable{$TName}}; @@ -2771,10 +2772,12 @@ sub getTypeInfo($) } } + my $RealType = $TInfo{"Type"}; + if(defined $ClassMethods{$ID}) { if($TInfo{"Type"} eq "Struct") { - $TInfo{"Type"} = "Class"; + $RealType = "Class"; } } @@ -2794,7 +2797,7 @@ sub getTypeInfo($) } } } - if($TInfo{"Type"} eq "Class") { + if($RealType eq "Class") { $TInfo{"Copied"} = 1; # will be changed in getSymbolInfo() } @@ -3682,7 +3685,10 @@ sub getSymbolInfo($) } else { # NOTE: default access of class methods in the debug info is "private" - $SInfo{"Private"} = 1; + if($TypeInfo{$SInfo{"Class"}}{"Type"} eq "Class") + { + $SInfo{"Private"} = 1; + } } # clean origin @@ -3753,7 +3759,10 @@ sub getSymbolInfo($) { if(defined $TypeInfo{$NS}) { # NOTE: default access of class methods in the debug info is "private" - $SInfo{"Private"} = 1; + if($TypeInfo{$NS}{"Type"} eq "Class") + { + $SInfo{"Private"} = 1; + } } } } @@ -3762,6 +3771,7 @@ sub getSymbolInfo($) { $SInfo{"Class"} = $Class; } + if(my $NS = $NameSpace{$ID}) { if($DWARF_Info{$NS}{"Kind"} eq "namespace") { |