[Mono-dev] RootContext.cs

Mudit Vaidya muditvaidya at gmail.com
Thu Feb 12 18:49:12 EST 2009


The AddField method is called from cs-parser.cs class twice. But for 
some reason, nothing gets printed on the console when I use 
Console.WriteLine() in AddField.

Also, I am using VS 2008. How can I debug the code because when I try to 
use the debug feature,  I get the following on output window

'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\mcs.vshost.exe', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
'mcs.vshost.exe' (Managed): Loaded 
'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', 
Skipped loading symbols. Module is optimized and the debugger option 
'Just My Code' is enabled.
The thread 0xc0c has exited with code 0 (0x0).
The thread 0x13b4 has exited with code 0 (0x0).
'mcs.vshost.exe' (Managed): Loaded 
'C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\mcs.exe', 
Symbols loaded.
The thread 0x1680 has exited with code 0 (0x0).
The thread 0x1704 has exited with code 0 (0x0).
The thread 0x11b4 has exited with code 0 (0x0).
The program '[2952] mcs.vshost.exe: Managed' has exited with code 0 (0x0).

Any help appreciated
Thanks




Mudit Vaidya wrote:
> I could find the AddField method in class.cs. I just put a simple 
> "hello" output statement in the AddField method but that was not 
> printed on the console.
> Who calls the AddField method ?
>
>
>
> Marek Safar wrote:
>> Hi,
>>> I am using the following code to access the variables of class 
>>> compiled by mcs but I get no output on the console.
>>>
>>>   
>> It depends when you are accessing those fields, but they should be 
>> available for most of compilation time.
>>
>> Look how it works in TypeContainer::AddField (FieldBase field)
>>
>>> ArrayList ad = new ArrayList();
>>>                ad.Add(tc.Fields);
>>> String[] ia = (String[])ad.ToArray(typeof(String));
>>> Console.WriteLine(ia[0]);
>>>             for (int k = 0; k < ia.Length; k++)
>>>                Console.WriteLine("ia.count"+ia.Length+ia.GetValue(k));
>>>
>>> what is the reason for tc.Fields not having any values ?
>>>   
>> This code does not make a sense. TypeContainer::Fields returns a 
>> collection and you are adding this collection into another collection 
>> and then expecting to get string values, isn't that strange?
>>
>> Marek
>>
>>> Marek Safar wrote:
>>>  
>>>> Hi,
>>>>   
>>>>> I am trying to find out what variables were contained in the c# 
>>>>> file parsed by mcs. I am looking in RootContext.cs where the whole 
>>>>> structure is created but I am unable to access the variables of 
>>>>> the class.
>>>>> Any help appreciated.
>>>>>
>>>>>         
>>>> I don't know what information you need but type fields are stored 
>>>> in TypeContainer::Fields
>>>>
>>>> Marek
>>>>
>>>>     
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>>   
>>
>>
>


More information about the Mono-devel-list mailing list