You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
capa does not emit the <namespace>.<class> of the class that encloses a nested class.
e.g when processing Settings.System::PutInt, capa emits only System::PutInt when ideally capa would emit something like Android.Provider.Settings.System::PutInt.
The suggestion of using Android.Provider.Settings.System::PutInt could be confusing though because, based on how capa currently treats namespaces + classes, this makes it appear that Android.Provider.Settings is a namespace when it is a class. Alternately, capa could take the same route as dnSpy by emitting Android.Provider.Settings/System::PutInt where / denotes a nested class signifying that Android.Provider.Settings is the enclosing class and System is the nested class.
How should capa emit features for Android.Provider.Settings/System::PutInt?
capa currently emits:
namespace(Android.Provider)
class(Android.Provider.Settings)
class(System)
import(System::PutInt)
api(System::PutInt)
I propose that capa emit:
namespace(Android.Provider)
class(Android.Provider.Settings)
class(Android.Provider.Settings/System)
import(Android.Provider.Settings/System::PutInt)
api(Android.Provider.Settings/System::PutInt)
Reading the ECMA specs, I can't find anything that states a max nesting depth for .NET types. Therefore, we should not assume a max depth when coding this new feature.
capa should handle nested classes for both locally defined (TypeDef) classes and imported (TypeRef) classes. For TypeDef classes, capa should be able to use the NestedClasses (0x29) table. For TypeRef classes, capa should be able to use the ResolutionScope index where a TypeRef is nested if its ResolutionScope index is a TypeRef index.
The text was updated successfully, but these errors were encountered:
capa does not emit the
<namespace>.<class>
of the class that encloses a nested class.e.g when processing
Settings.System::PutInt
, capa emits onlySystem::PutInt
when ideally capa would emit something likeAndroid.Provider.Settings.System::PutInt
.The suggestion of using
Android.Provider.Settings.System::PutInt
could be confusing though because, based on how capa currently treats namespaces + classes, this makes it appear thatAndroid.Provider.Settings
is a namespace when it is a class. Alternately, capa could take the same route asdnSpy
by emittingAndroid.Provider.Settings/System::PutInt
where/
denotes a nested class signifying thatAndroid.Provider.Settings
is the enclosing class andSystem
is the nested class.How should capa emit features for
Android.Provider.Settings/System::PutInt
?capa currently emits:
namespace(Android.Provider)
class(Android.Provider.Settings)
class(System)
import(System::PutInt)
api(System::PutInt)
I propose that capa emit:
namespace(Android.Provider)
class(Android.Provider.Settings)
class(Android.Provider.Settings/System)
import(Android.Provider.Settings/System::PutInt)
api(Android.Provider.Settings/System::PutInt)
Reading the ECMA specs, I can't find anything that states a max nesting depth for .NET types. Therefore, we should not assume a max depth when coding this new feature.
capa should handle nested classes for both locally defined (
TypeDef
) classes and imported (TypeRef
) classes. ForTypeDef
classes, capa should be able to use theNestedClasses
(0x29) table. ForTypeRef
classes, capa should be able to use theResolutionScope
index where aTypeRef
is nested if itsResolutionScope
index is aTypeRef
index.The text was updated successfully, but these errors were encountered: