Hey Miguel, sorry for the small delay to reply:
El 10/08/10 21:41, Miguel de Icaza escribió:
> In your recent commit, you added a new command to mcs/tools/corcompare,
> the mono-abi-info tool. I do not know what this tool does, and I do
> not know why we could not just have used mono-api-info with a new flag
> --abi instead of installing another executable.
I thought about this, but it would be a bit weird to use a tool called
"mono-api-info" if you don't want the API but the ABI. This is why I
thought it would be more intuitive this way.
> It goes against the "If it is not documented, it does not exist" rule.
Then mono-api-info doesn't exist either :) (there's no man page for it)
> So can we:
>
> (a) get this merged into mono-api-info
I'm thinking I can get it to be the same executable, but can it be a
different script called "mono-abi-info" which internally calls
mono-api-info.exe passing the flag?
> (b) document this on the wiki or the relevant man pages?
If there's no man page for mono-api-info, I prefer to do it in a wiki
page, ok? (Don't know man format enough to not copy-paste the structure ;) )
I'll work on it tomorrow. Thanks for the feedback.
Andres
>
> miguel
>
>> Branch: refs/heads/master
>> Home: http://github.com/mono/mono
>>
>> Commit: c508a786c106ceff274b9b985919368b6b404342
>> Author: Andrés G. Aragoneses
>> Date: 08/10/2010 14:36:27
>>URL:
>> http://github.com/mono/mono/commit/c508a786c106ceff274b9b985919368b6b404342
>>
>> Added new ABI mode to mono-api-info tool, wrapped in a mono-abi-info script.
>>
>> 2010-08-05 Andrés G. Aragoneses
>>
>> * mcs/tools/corcompare/mono-api-info.cs: Implemented new mode to show ABI.
>> * mcs/tools/corcompare/Makefile: added mono-abi-info autofoo.
>> * scripts/.gitignore: added mono-abi-info.
>> * scripts/Makefile.am: added mono-abi-info autofoo.
>>
>> Changed paths:
>> M ChangeLog
>> M mcs/tools/corcompare/ChangeLog
>> M mcs/tools/corcompare/Makefile
>> M mcs/tools/corcompare/mono-api-info.cs
>> M scripts/.gitignore
>> M scripts/Makefile.am
>>
>> Modified: ChangeLog
>> ===
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2010-08-05 Andr??s G. Aragoneses
>> +
>> +* scripts/.gitignore: added mono-abi-info.
>> +* scripts/Makefile.am: added mono-abi-info autofoo.
>> +
>> 2010-07-16 Zoltan Varga
>>
>> * configure.in: Remove the 'LLVM backend is experimental' warning.
>> Modified: mcs/tools/corcompare/ChangeLog
>> ===
>> --- a/mcs/tools/corcompare/ChangeLog
>> +++ b/mcs/tools/corcompare/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2010-08-05 Andr??s G. Aragoneses
>> +
>> +* mono-api-info.cs: Implemented new mode to show ABI.
>> +* Makefile: added mono-abi-info autofoo.
>> +
>> 2010-04-16 C.J. Adams-Collier
>>
>> * mono-api-diff.cs: revived from the mono-2-2 branch and applied
>> Modified: mcs/tools/corcompare/Makefile
>> ===
>> --- a/mcs/tools/corcompare/Makefile
>> +++ b/mcs/tools/corcompare/Makefile
>> @@ -2,7 +2,7 @@ thisdir = tools/corcompare
>> SUBDIRS =
>> include ../../build/rules.make
>>
>> -ALL_PROGRAMS = mono-api-info.exe
>> +ALL_PROGRAMS = mono-api-info.exe mono-abi-info.exe
>>
>> CECIL = ../../class/lib/net_2_0/Mono.Cecil.dll
>>
>> @@ -43,3 +43,6 @@ dist-local: dist-default
>>
>> mono-api-info.exe: $(APIINFO_SOURCES)
>> $(CSCOMPILE) -r:$(CECIL) -out:$@ $^
>> +
>> +mono-abi-info.exe: $(APIINFO_SOURCES)
>> +$(CSCOMPILE) -r:$(CECIL) -d:ABI -out:$@ $^
>> Modified: mcs/tools/corcompare/mono-api-info.cs
>> ===
>> --- a/mcs/tools/corcompare/mono-api-info.cs
>> +++ b/mcs/tools/corcompare/mono-api-info.cs
>> @@ -29,6 +29,9 @@ namespace CorCompare
>> if (args.Length == 0)
>> return 1;
>>
>> +AbiMode = false;
>> +SetAbiMode ();
>> +
>> AssemblyCollection acoll = new AssemblyCollection ();
>>
>> foreach (string fullName in args) {
>> @@ -45,6 +48,14 @@ namespace CorCompare
>> doc.WriteTo (writer);
>> return 0;
>> }
>> +
>> +[System.Diagnostics.Conditional ("ABI")]
>> +private static void SetAbiMode ()
>> +{
>> +AbiMode = true;
>> +}
>> +
>> +internal static bool AbiMode { get; private set; }
>> }
>>
>> public class Utils {
>> @@ -211,7 +222,7 @@ namespace CorCompare
>> if (string.IsNullOrEmpty (t.Namespace))
>> continue;
>>
>> -if ((t.Attributes &
>> TypeAttributes.VisibilityMask) != TypeAttributes.Public)
>> +