Skip to content

Commit

Permalink
[tools] Merge mono-abi-info tool into a "--abi" flag for mono-api-info
Browse files Browse the repository at this point in the history
This commit also includes a brief (help welcome!) man page for
mono-api-info that explains its usage.
  • Loading branch information
knocte authored and gonzalop committed Aug 23, 2010
1 parent 90c3c6a commit 744d29e
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 15 deletions.
1 change: 1 addition & 0 deletions man/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ man_MANS = \
monodocs2html.1 \ monodocs2html.1 \
monolinker.1 \ monolinker.1 \
monop.1 \ monop.1 \
mono-api-info.1 \
mono-service.1 \ mono-service.1 \
mono-shlib-cop.1 \ mono-shlib-cop.1 \
mono-xmltool.1 \ mono-xmltool.1 \
Expand Down
36 changes: 36 additions & 0 deletions man/mono-api-info.1
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,36 @@
.\"
.\" mono-api-info manual page.
.\" Copyright (C) 2010 Linden Lab, Inc (http://www.lindenlab.com)
.\" Author:
.\" Andrés G. Aragoneses <andres@lindenlab.com>
.\"
.TH Mono "mono-api-info"
.SH NAME
mono-api-info \- Expose IL structure of CLR assemblies as XML.
.
.SH SYNOPSIS
.PP
.B mono-api-info [--abi] assembly1.dll assembly2.exe ...
.SH DESCRIPTION
Expose the structure of your CLR assemblies by examining their IL and
giving XML output.
.PP
By default this tool gives information about just the public API of the
assemblies to scan. So it's good for comparing API compatibility between
versions of libraries.
.SH OPTIONS
.TP
.I "--abi"
Show the ABI instead of the API, that is, non-static fields (even the
non-public ones) that are not marked as [NonSerialized()].
.SH AUTHOR
Written by Andrés G. Aragoneses
.SH COPYRIGHT
Copyright (C) 2010 LindenLab.
Released under BSD license.
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
.SH WEB SITE
Visit http://www.mono-project.com for details
.SH SEE ALSO
.BR mono(1)
5 changes: 1 addition & 4 deletions mcs/tools/corcompare/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ thisdir = tools/corcompare
SUBDIRS = SUBDIRS =
include ../../build/rules.make include ../../build/rules.make


ALL_PROGRAMS = mono-api-info.exe mono-abi-info.exe ALL_PROGRAMS = mono-api-info.exe


CECIL = ../../class/lib/net_2_0/Mono.Cecil.dll CECIL = ../../class/lib/net_2_0/Mono.Cecil.dll


Expand Down Expand Up @@ -43,6 +43,3 @@ dist-local: dist-default


mono-api-info.exe: $(APIINFO_SOURCES) mono-api-info.exe: $(APIINFO_SOURCES)
$(CSCOMPILE) -r:$(CECIL) -out:$@ $^ $(CSCOMPILE) -r:$(CECIL) -out:$@ $^

mono-abi-info.exe: $(APIINFO_SOURCES)
$(CSCOMPILE) -r:$(CECIL) -d:ABI -out:$@ $^
14 changes: 5 additions & 9 deletions mcs/tools/corcompare/mono-api-info.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ public static int Main (string [] args)
return 1; return 1;


AbiMode = false; AbiMode = false;
SetAbiMode ();


AssemblyCollection acoll = new AssemblyCollection (); AssemblyCollection acoll = new AssemblyCollection ();


foreach (string fullName in args) { foreach (string arg in args) {
acoll.Add (fullName); if (arg == "--abi")
AbiMode = true;
else
acoll.Add (arg);
} }


XmlDocument doc = new XmlDocument (); XmlDocument doc = new XmlDocument ();
Expand All @@ -49,12 +51,6 @@ public static int Main (string [] args)
return 0; return 0;
} }


[System.Diagnostics.Conditional ("ABI")]
private static void SetAbiMode ()
{
AbiMode = true;
}

internal static bool AbiMode { get; private set; } internal static bool AbiMode { get; private set; }
} }


Expand Down
1 change: 0 additions & 1 deletion scripts/.gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
/mkbundle2 /mkbundle2
/mod /mod
/mono-api-diff /mono-api-diff
/mono-abi-info
/mono-api-info /mono-api-info
/mono-api-info1 /mono-api-info1
/mono-api-info2 /mono-api-info2
Expand Down
1 change: 0 additions & 1 deletion scripts/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ scripts_4_0 = \
mconfig$(SCRIPT_SUFFIX) \ mconfig$(SCRIPT_SUFFIX) \
mod$(SCRIPT_SUFFIX) \ mod$(SCRIPT_SUFFIX) \
monolinker$(SCRIPT_SUFFIX) \ monolinker$(SCRIPT_SUFFIX) \
mono-abi-info$(SCRIPT_SUFFIX) \
mono-api-info$(SCRIPT_SUFFIX) \ mono-api-info$(SCRIPT_SUFFIX) \
mono-shlib-cop$(SCRIPT_SUFFIX) \ mono-shlib-cop$(SCRIPT_SUFFIX) \
mozroots$(SCRIPT_SUFFIX) \ mozroots$(SCRIPT_SUFFIX) \
Expand Down

0 comments on commit 744d29e

Please sign in to comment.