[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] Visibility modifiers from ILMethod*?
From: |
Gopal V |
Subject: |
Re: [Pnet-developers] Visibility modifiers from ILMethod*? |
Date: |
Mon, 03 Apr 2006 09:20:21 +0530 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007) |
Petter Haggholm wrote:
Quick question: I'm hacking on Portable.NET for a course project and
need to extract miscellaneous information given an ILMethod*;
Interesting ...
wondering, is there any way I can find, given an ILMethod*, that
method's visibility modifier -- e.g. public, private ...? For that
matter -- is it /available?/
#define ILMethod_IsPublic(method) \
((ILMemberGetAttrs((ILMember *)(method)) & \
IL_META_METHODDEF_MEMBER_ACCESS_MASK) \
== IL_META_METHODDEF_PUBLIC)
From il_program.h:1191
while I've been able to find most of the information I need through e.g.
ILMember and similar classes, this one thing eludes me (and grepping the
source directory for e.g. "private" gives far too many results to be
useful).
cscope rules. And a good approach is to figure out how ildasm gets
this data. pnet/dumpasm/ is basically where all that lives.
All that code sort of implements inheritance where a pointer is a
ILProgramItem, ILMember and ILMethod all in once. Casts all over
the place - it becomes slightly hard to start off with :)
Cheers,
Gopal
--
Make sure every module hides something.
- The Elements of Programming Style (Kernighan & Plaugher)