[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnet/ildd ildd.1,1.2,1.3 ildd.c,1.2,1.3
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnet/ildd ildd.1,1.2,1.3 ildd.c,1.2,1.3 |
Date: |
Mon, 24 Nov 2003 11:36:36 +0000 |
Update of /cvsroot/dotgnu-pnet/pnet/ildd
In directory subversions:/tmp/cvs-serv15532/ildd
Modified Files:
ildd.1 ildd.c
Log Message:
Dump file and resource declarations from "ildd"; add the "-f" option to "ildd"
to force filenames to be displayed even if there is only one name.
Index: ildd.1
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildd/ildd.1,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ildd.1 2 May 2003 23:44:20 -0000 1.2
--- ildd.1 24 Nov 2003 11:36:34 -0000 1.3
***************
*** 1,3 ****
! .\" Copyright (c) 2002 Southern Storm Software, Pty Ltd.
.\"
.\" This program is free software; you can redistribute it and/or modify
--- 1,3 ----
! .\" Copyright (c) 2002, 2003 Southern Storm Software, Pty Ltd.
.\"
.\" This program is free software; you can redistribute it and/or modify
***************
*** 14,18 ****
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! .TH ildd 1 "4 July 2002" "Southern Storm Software" "Portable.NET Development
Tools"
.SH NAME
ildd \- print Intermediate Language (IL) program dependencies
--- 14,18 ----
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! .TH ildd 1 "24 November 2003" "Southern Storm Software" "Portable.NET
Development Tools"
.SH NAME
ildd \- print Intermediate Language (IL) program dependencies
***************
*** 25,31 ****
.SH DESCRIPTION
.B Ildd
! lists the assemblies and PInvoke modules that are referenced by an IL object
file (.obj), an IL executable (.exe), or an IL dynamic link library (.dll).
.SH OPTIONS
.TP
.B \-p, \-\-pinvoke
--- 25,35 ----
.SH DESCRIPTION
.B Ildd
! lists the assemblies and modules that are referenced by an IL object
file (.obj), an IL executable (.exe), or an IL dynamic link library (.dll).
.SH OPTIONS
+ .TP
+ .B \-f, \-\-file\-names
+ Print the name of each file that is processed, even if there is only
+ one file specified.
.TP
.B \-p, \-\-pinvoke
Index: ildd.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildd/ildd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ildd.c 2 May 2003 23:44:20 -0000 1.2
--- ildd.c 24 Nov 2003 11:36:34 -0000 1.3
***************
*** 2,6 ****
* ildd.c - Print information about library dependencies.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
--- 2,6 ----
* ildd.c - Print information about library dependencies.
*
! * Copyright (C) 2002, 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
***************
*** 33,43 ****
*/
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,
! "--version or -v",
"Print the version of the program."},
{"--help", 'h', 0,
--- 33,47 ----
*/
static ILCmdLineOption const options[] = {
+ {"-f", 'f', 0, 0, 0},
+ {"--file-names", 'f', 0,
+ "--file-names or -f",
+ "Print the name of each file that is processed."},
{"-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,
! "--version or -v",
"Print the version of the program."},
{"--help", 'h', 0,
***************
*** 55,58 ****
--- 59,63 ----
{
char *progname = argv[0];
+ int filenames = 0;
int pinvoke = 0;
int sawStdin;
***************
*** 70,73 ****
--- 75,84 ----
switch(opt)
{
+ case 'f':
+ {
+ filenames = 1;
+ }
+ break;
+
case 'p':
{
***************
*** 110,114 ****
sawStdin = 0;
errors = 0;
! multiple = (argc > 2);
while(argc > 1)
{
--- 121,125 ----
sawStdin = 0;
errors = 0;
! multiple = ((argc > 2) || filenames);
while(argc > 1)
{
***************
*** 141,145 ****
{
fprintf(stdout, "ILDD " VERSION " - IL Library Dependencies Utility\n");
! fprintf(stdout, "Copyright (c) 2002 Southern Storm Software, Pty
Ltd.\n");
fprintf(stdout, "\n");
fprintf(stdout, "Usage: %s [options] input ...\n", progname);
--- 152,156 ----
{
fprintf(stdout, "ILDD " VERSION " - IL Library Dependencies Utility\n");
! fprintf(stdout, "Copyright (c) 2002, 2003 Southern Storm Software, Pty
Ltd.\n");
fprintf(stdout, "\n");
fprintf(stdout, "Usage: %s [options] input ...\n", progname);
***************
*** 152,156 ****
fprintf(stdout, "ILDD " VERSION " - IL Library Dependencies Utility\n");
! fprintf(stdout, "Copyright (c) 2002 Southern Storm Software, Pty
Ltd.\n");
printf("\n");
printf("ILDD comes with ABSOLUTELY NO WARRANTY. This is free
software,\n");
--- 163,167 ----
fprintf(stdout, "ILDD " VERSION " - IL Library Dependencies Utility\n");
! fprintf(stdout, "Copyright (c) 2002, 2003 Southern Storm Software, Pty
Ltd.\n");
printf("\n");
printf("ILDD comes with ABSOLUTELY NO WARRANTY. This is free
software,\n");
***************
*** 175,182 ****
ILPInvoke *pinv;
ILMethod *method;
! #if 0
! void *dynlib;
! void *symbol;
! #endif
/* Attempt to load the image into memory */
--- 186,191 ----
ILPInvoke *pinv;
ILMethod *method;
! ILFileDecl *file;
! ILManifestRes *res;
/* Attempt to load the image into memory */
***************
*** 238,241 ****
--- 247,300 ----
}
+ /* Print the external file references that this file depends upon */
+ file = 0;
+ while((file = (ILFileDecl *)ILImageNextToken
+ (image, IL_META_TOKEN_FILE, file)) != 0)
+ {
+ if(ILFileDecl_HasMetaData(file))
+ {
+ printf("\tfile %s => ", ILFileDecl_Name(file));
+ path = ILImageSearchPath(ILFileDecl_Name(file), 0,
+
filename, 0, 0, 0, 0, 0, 0);
+ if(path)
+ {
+ fputs(path, stdout);
+ ILFree(path);
+ }
+ else
+ {
+ fputs("??", stdout);
+ }
+ putc('\n', stdout);
+ }
+ else
+ {
+ printf("\tfile %s\n", ILFileDecl_Name(file));
+ }
+ }
+
+ /* Print the manifest resource information for the file */
+ res = 0;
+ while((res = (ILManifestRes *)ILImageNextToken
+ (image, IL_META_TOKEN_MANIFEST_RESOURCE, res))
!= 0)
+ {
+ if(ILManifestRes_OwnerFile(res) != 0)
+ {
+ printf("\tresource %s => file %s\n",
+ ILManifestRes_Name(res),
+
ILFileDecl_Name(ILManifestRes_OwnerFile(res)));
+ }
+ else if(ILManifestRes_OwnerAssembly(res) != 0)
+ {
+ printf("\tresource %s => assembly %s\n",
+ ILManifestRes_Name(res),
+
ILAssembly_Name(ILManifestRes_OwnerAssembly(res)));
+ }
+ else
+ {
+ printf("\tresource %s => (internal)\n",
ILManifestRes_Name(res));
+ }
+ }
+
/* Print the external PInvoke'd functions that this file depends upon */
pinv = 0;
***************
*** 266,285 ****
{
fputs(path, stdout);
- #if 0
- dynlib = ILDynLibraryOpen(path);
- if(!dynlib)
- {
- fputs(" (module not found)", stdout);
- }
- else
- {
- symbol = ILDynLibraryGetSymbol(dynlib, name);
- if(!symbol)
- {
- fputs(" (symbol not found)", stdout);
- }
- }
ILFree(path);
- #endif
}
else
--- 325,329 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnet/ildd ildd.1,1.2,1.3 ildd.c,1.2,1.3,
Rhys Weatherley <address@hidden> <=