dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/ildd ildd.1,1.1,1.2 ildd.c,1.1,1.2


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/ildd ildd.1,1.1,1.2 ildd.c,1.1,1.2
Date: Fri, 02 May 2003 19:44:23 -0400

Update of /cvsroot/dotgnu-pnet/pnet/ildd
In directory subversions:/tmp/cvs-serv12559/ildd

Modified Files:
        ildd.1 ildd.c 
Log Message:


Dump module references and add an option for dumping PInvoke declarations.


Index: ildd.1
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildd/ildd.1,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ildd.1      4 Jul 2002 12:47:43 -0000       1.1
--- ildd.1      2 May 2003 23:44:20 -0000       1.2
***************
*** 29,32 ****
--- 29,35 ----
  .SH OPTIONS
  .TP
+ .B \-p, \-\-pinvoke
+ Print detailed information about PInvoke declarations.
+ .TP
  .B \-\-help
  Print a usage message for the \fBildd\fR program.

Index: ildd.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildd/ildd.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ildd.c      4 Jul 2002 12:47:43 -0000       1.1
--- ildd.c      2 May 2003 23:44:20 -0000       1.2
***************
*** 33,36 ****
--- 33,40 ----
   */
  static ILCmdLineOption const options[] = {
+       {"-p", 'p', 0, 0, 0},
+       {"--pinvoke", 'p', 0,
+               "--pinvoke or -p",
+               "Print detailed information on PInvoke declarations."},
        {"-v", 'v', 0, 0, 0},
        {"--version", 'v', 0,
***************
*** 46,54 ****
  static void version(void);
  static int printDependencies(const char *filename, ILContext *context,
!                                                        int multiple);
  
  int main(int argc, char *argv[])
  {
        char *progname = argv[0];
        int sawStdin;
        int state, opt;
--- 50,59 ----
  static void version(void);
  static int printDependencies(const char *filename, ILContext *context,
!                                                        int multiple, int 
pinvoke);
  
  int main(int argc, char *argv[])
  {
        char *progname = argv[0];
+       int pinvoke = 0;
        int sawStdin;
        int state, opt;
***************
*** 65,68 ****
--- 70,79 ----
                switch(opt)
                {
+                       case 'p':
+                       {
+                               pinvoke = 1;
+                       }
+                       break;
+ 
                        case 'v':
                        {
***************
*** 107,111 ****
                        if(!sawStdin)
                        {
!                               errors |= printDependencies("-", context, 
multiple);
                                sawStdin = 1;
                        }
--- 118,122 ----
                        if(!sawStdin)
                        {
!                               errors |= printDependencies("-", context, 
multiple, pinvoke);
                                sawStdin = 1;
                        }
***************
*** 114,118 ****
                {
                        /* Dump the contents of a regular file */
!                       errors |= printDependencies(argv[1], context, multiple);
                }
                ++argv;
--- 125,129 ----
                {
                        /* Dump the contents of a regular file */
!                       errors |= printDependencies(argv[1], context, multiple, 
pinvoke);
                }
                ++argv;
***************
*** 154,161 ****
   */
  static int printDependencies(const char *filename, ILContext *context,
!                                                        int multiple)
  {
        ILImage *image;
        ILAssembly *assem;
        const char *name;
        const ILUInt16 *version;
--- 165,173 ----
   */
  static int printDependencies(const char *filename, ILContext *context,
!                                                        int multiple, int 
pinvoke)
  {
        ILImage *image;
        ILAssembly *assem;
+       ILModule *module;
        const char *name;
        const ILUInt16 *version;
***************
*** 163,168 ****
--- 175,182 ----
        ILPInvoke *pinv;
        ILMethod *method;
+ #if 0
        void *dynlib;
        void *symbol;
+ #endif
  
        /* Attempt to load the image into memory */
***************
*** 216,222 ****
        }
  
        /* Print the external PInvoke'd functions that this file depends upon */
        pinv = 0;
!       while((pinv = (ILPInvoke *)ILImageNextToken
                                (image, IL_META_TOKEN_IMPL_MAP, pinv)) != 0)
        {
--- 230,244 ----
        }
  
+       /* Print the module references that this file depends upon */
+       module = 0;
+       while((module = (ILModule *)ILImageNextToken
+                               (image, IL_META_TOKEN_MODULE_REF, module)) != 0)
+       {
+               printf("\tmodule %s\n", ILModule_Name(module));
+       }
+ 
        /* Print the external PInvoke'd functions that this file depends upon */
        pinv = 0;
!       while(pinvoke && (pinv = (ILPInvoke *)ILImageNextToken
                                (image, IL_META_TOKEN_IMPL_MAP, pinv)) != 0)
        {
***************
*** 244,247 ****
--- 266,270 ----
                {
                        fputs(path, stdout);
+ #if 0
                        dynlib = ILDynLibraryOpen(path);
                        if(!dynlib)
***************
*** 258,261 ****
--- 281,285 ----
                        }
                        ILFree(path);
+ #endif
                }
                else





reply via email to

[Prev in Thread] Current Thread [Next in Thread]