DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 08 Aug 2007 05:37:54 -0700,    posted on: microsoft.public.dotnet.framework.clr        back       

Thread Index
  1    unknown
          2    Gnter Prossliner g.prossliner/gmx/at
                 3    Ben Voigt [C++ MVP] am
                        4    Gnter Prossliner g.prossliner/gmx/at
          5    Gnter Prossliner g.prossliner/gmx/at


source file and line numbers for mdMethodDef   
Hi,

I have mdMethodDef  and IMetaDataImport. I can use to to figure out
the name and class of the
method using GetMethodProps.
How do I find the source-file and line number that this method is
defined,?
I do have the pdb files.

Thanks,
~jyoti
Date:Wed, 08 Aug 2007 05:37:54 -0700   Author:  

Re: source file and line numbers for mdMethodDef   
Hello!


> How do I find the source-file and line number that this method is
> defined,?
> I do have the pdb files.


Without .pdb you are out of luck. This information is stored within the .pdb 
Files, not the Assembly itself. I do not know any managed compiler which 
compiles this information into the image itself.



GP
Date:Wed, 8 Aug 2007 16:59:37 +0200   Author:  

Re: source file and line numbers for mdMethodDef   
"Gnter Prossliner" <g.prossliner/gmx/at> wrote in message 
news:enLs%23yc2HHA.5980@TK2MSFTNGP04.phx.gbl...

> Hello!
>
>> How do I find the source-file and line number that this method is
>> defined,?
>> I do have the pdb files.
>
> Without .pdb you are out of luck. This information is stored within the 
> .pdb Files, not the Assembly itself. I do not know any managed compiler 
> which compiles this information into the image itself.
>


None of this applies to the OP, who *does* have the .pdb files.


>
>
> GP
> 
Date:Wed, 8 Aug 2007 16:18:47 -0500   Author:  

Re: source file and line numbers for mdMethodDef   
Hello!


>>> I do have the pdb files.
>>
>   ....
>
> None of this applies to the OP, who *does* have the .pdb files.


:-D

I've read: "I do _not_ have the pdb files."

Sorry.


GP
Date:Thu, 9 Aug 2007 09:01:42 +0200   Author:  

Re: source file and line numbers for mdMethodDef   
Hello!


> I have mdMethodDef  and IMetaDataImport. I can use to to figure out
> the name and class of the
> method using GetMethodProps.
> How do I find the source-file and line number that this method is
> defined,?


I do not see any way to get this information directly (the 
System.Runtime.Remoting.MethodInfo also doesn't expose this).

But you can try to get the RVA by using the

IMetaDataImport::GetMethodProps(..... [out] ULONG *pulCodeRVA ...);

Maybe you can get the Linenumber / Filename by using the DbgHelp Library.

[Retrieving Symbol Information by Address]
http://msdn2.microsoft.com/en-us/library/ms680578.aspx




GP
Date:Thu, 9 Aug 2007 09:30:17 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us