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

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

[Dotgnu-pnet-commits] CVS: pnet/ildasm ildasm.1,1.1.1.1,1.2 ildasm_clas


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/ildasm ildasm.1,1.1.1.1,1.2 ildasm_class.c,1.7,1.8 ildasm_internal.h,1.4,1.5 ildasm_main.c,1.3,1.4ildasm_method.c,1.10,1.11
Date: Fri, 13 Dec 2002 01:48:02 -0500

Update of /cvsroot/dotgnu-pnet/pnet/ildasm
In directory subversions:/tmp/cvs-serv9071/ildasm

Modified Files:
        ildasm.1 ildasm_class.c ildasm_internal.h ildasm_main.c 
        ildasm_method.c 
Log Message:


Implement '/' compatibility options for "ildasm".


Index: ildasm.1
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildasm/ildasm.1,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** ildasm.1    13 Aug 2001 05:22:45 -0000      1.1.1.1
--- ildasm.1    13 Dec 2002 06:48:00 -0000      1.2
***************
*** 65,68 ****
--- 65,74 ----
  the problem is.
  .TP
+ .B \-b, --dump-bytes
+ Dump the IL instruction bytes in hexadecimal.
+ .TP
+ .B \-n, --no-il
+ Do not dump the IL instructions within the methods.
+ .TP
  .B \-\-help
  Print a usage message for the \fBildasm\fR program.

Index: ildasm_class.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildasm/ildasm_class.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** ildasm_class.c      29 Jul 2002 03:32:32 -0000      1.7
--- ildasm_class.c      13 Dec 2002 06:48:00 -0000      1.8
***************
*** 109,113 ****
  
        /* If we have an RVA, then we need to dump the method's contents */
!       if(rva)
        {
                if(ILMethod_IsJava(method))
--- 109,113 ----
  
        /* If we have an RVA, then we need to dump the method's contents */
!       if(rva && (flags & ILDASM_NO_IL) == 0)
        {
                if(ILMethod_IsJava(method))

Index: ildasm_internal.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildasm/ildasm_internal.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ildasm_internal.h   11 Feb 2002 05:42:57 -0000      1.4
--- ildasm_internal.h   13 Dec 2002 06:48:00 -0000      1.5
***************
*** 37,42 ****
   * Extra flags for altering the output, in addition to "IL_DUMP_xxx".
   */
! #define       ILDASM_REAL_OFFSETS                     256
! #define       ILDASM_SUPPRESS_PREFIX          512
  
  /*
--- 37,44 ----
   * Extra flags for altering the output, in addition to "IL_DUMP_xxx".
   */
! #define       ILDASM_REAL_OFFSETS                     (1 << 8)
! #define       ILDASM_SUPPRESS_PREFIX          (1 << 9)
! #define       ILDASM_NO_IL                            (1 << 10)
! #define       ILDASM_INSTRUCTION_BYTES        (1 << 11)
  
  /*

Index: ildasm_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildasm/ildasm_main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ildasm_main.c       15 Jan 2002 23:49:01 -0000      1.3
--- ildasm_main.c       13 Dec 2002 06:48:00 -0000      1.4
***************
*** 35,38 ****
--- 35,40 ----
        {"-q", 'q', 0, 0, 0},
        {"-w", 'w', 0, 0, 0},
+       {"-b", 'b', 0, 0, 0},
+       {"-n", 'n', 0, 0, 0},
        {"-v", 'v', 0, 0, 0},
        {"--output", 'o', 1,
***************
*** 54,57 ****
--- 56,65 ----
                "--whole-file     or    -w",
                "Dump the contents of the entire file in hexadecimal."},
+       {"--dump-bytes", 'w', 0,
+               "--dump-bytes     or    -b",
+               "Dump the bytes of each IL instruction in hexadecimal."},
+       {"--no-il", 'n', 0,
+               "--no-il          or    -n",
+               "Do not dump the IL instructions for the methods."},
        {"--version", 'v', 0,
                "--version        or    -v",
***************
*** 60,63 ****
--- 68,93 ----
                "--help",
                "Print this help message."},
+ 
+       /* Options for compatibility with Microsoft's IL disassembler */
+       {"/all", 't', 0, 0, 0},         /* "/all" */
+       {"/byt*", 'b', 0, 0, 0},        /* "/bytes" */
+       {"/hea*", '?', 0, 0, 0},        /* "/header" */
+       {"/hel*", 'h', 0, 0, 0},        /* "/help */
+       {"/ite*", '?', 1, 0, 0},        /* "/item:XXX" */
+       {"/lin*", '?', 0, 0, 0},        /* "/linenum" */
+       {"/nob*", '?', 0, 0, 0},        /* "/nobar" */
+       {"/noi*", 'n', 0, 0, 0},        /* "/noil" */
+       {"/out*", 'o', 1, 0, 0},        /* "/output:filename" */
+       {"/pub*", '?', 0, 0, 0},        /* "/pubonly" */
+       {"/quo*", 'q', 0, 0, 0},        /* "/quoteallnames" */
+       {"/raw*", '?', 0, 0, 0},        /* "/raweh" */
+       {"/sou*", '?', 0, 0, 0},        /* "/source" */
+       {"/tex*", '?', 0, 0, 0},        /* "/text" */
+       {"/tok*", 't', 0, 0, 0},        /* "/tokens" */
+       {"/uni*", '?', 0, 0, 0},        /* "/unicode" */
+       {"/utf*", '?', 0, 0, 0},        /* "/utf8" */
+       {"/vis*", '?', 1, 0, 0},        /* "/visibility:vis" */
+       {"/?", 'h', 0, 0, 0},           /* "/?" */
+ 
        {0, 0, 0, 0, 0}
  };
***************
*** 126,129 ****
--- 156,177 ----
                        {
                                wholeFile = 1;
+                       }
+                       break;
+ 
+                       case 'b':
+                       {
+                               flags |= ILDASM_INSTRUCTION_BYTES;
+                       }
+                       break;
+ 
+                       case 'n':
+                       {
+                               flags |= ILDASM_NO_IL;
+                       }
+                       break;
+ 
+                       case '?':
+                       {
+                               /* Ignore this compatilibity option that we 
don't support */
                        }
                        break;

Index: ildasm_method.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildasm/ildasm_method.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** ildasm_method.c     27 Nov 2002 23:30:42 -0000      1.10
--- ildasm_method.c     13 Dec 2002 06:48:00 -0000      1.11
***************
*** 500,503 ****
--- 500,526 ----
                putc('\t', outstream);
                putc('\t', outstream);
+               if((flags & ILDASM_INSTRUCTION_BYTES) != 0)
+               {
+                       /* Dump the bytes of the instruction */
+                       int posn;
+                       putc('/', outstream);
+                       putc('*', outstream);
+                       putc(' ', outstream);
+                       posn = 0;
+                       while(posn < 6 && posn < isize)
+                       {
+                               fprintf(outstream, "%02X ", ((int)(temp[posn]) 
& 0xFF));
+                               ++posn;
+                       }
+                       while(posn < 6)
+                       {
+                               fputs("   ", outstream);
+                               ++posn;
+                       }
+                       putc(' ', outstream);
+                       putc('*', outstream);
+                       putc('/', outstream);
+                       putc(' ', outstream);
+               }
                fputs(info->name, outstream);
                if(argType != IL_OPCODE_ARGS_INVALID &&




reply via email to

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