Posted: Fri Jul 04, 2014 7:31 pm Post subject: .NET/mono type detection for AA?
I love the new .NET/mono features in 6.4 and was wondering if there is some way to detect an object's type in AA. I haven't had time to look through the source and try to understand how DotNetDataCollector works, but the pointer to the vtable at offset 0 seems to define what type an object is. I would love to be able to use some symbol in AA to get that vtable value. For example:
code:
push eax
mov eax,[esi]
cmp eax,[platformType]
jne skip
// do something for platforms only here
skip:
pop eax
cmp [esi+00000118],0 // original code
jmp return
Could I maybe use LUA to set those symbols? I see the monoscript.lua as a mono_findReferencesToObject function that seems to get the vtable value, is that what I need to use?
Something I just noticed that would be handy would be to have a vtable type for the data dissector or just display the type name for offset 0's vtable if structure has it selected that would show the class name, and a column in the watch windows that could be enabled to show the same. That's really pie-in-the-sky I know.
I haven't tried it myself, but you could probably call system.type.gettype yourself to get a type from a name and then interrogate further w/ the type members. To go the other way, and get a string from a type, you'd probably use object.getype passing your object's address as the implied this argument. _________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum