Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / March 2006

Tip: Looking for answers? Try searching our database.

How to go to a specific method by name in the Disassembly window?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Domashchenko - 10 Mar 2006 15:10 GMT
When I try to put a method's name in the Address: edit control it always
says that it "is a 'method', which is not valid in the given context".

What do I need to do to get the start address of the method?

Best regards,
Michael Domashchenko
"Wei-Dong XU [MSFT]" - 13 Mar 2006 10:02 GMT
Hi,

Thanks for the post at the community!

Since .Net code is compiled into CIL(common intermediate language) code and
it will be compiled into native code by just-in-time(JIT) compiler of .Net
runtime, the address of the method is dynamically placed by the .net JIT
compiler. So we cannot directly obtain the JIT generated method start
address in VS.net.

For this scenario, Microsoft releases one debugger extension for VS.net and
WinDBG to debug the managed code. This MSDN article will present one
introduction to you regarding how to use this debug managed code. It also
introduces the steps to obtain the method assembly address.
SOS: It's Not Just an ABBA Song Anymore
http://msdn.microsoft.com/msdnmag/issues/05/05/JITCompiler/

Please feel free to let me know if you have any further question on this
issue.

Have a nice day!

Best Regards,
Wei-Dong XU
Microsoft Support
---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------------------
It is my pleasure to be of any assistance.
Mike Domashchenko - 13 Mar 2006 20:06 GMT
1. Why is not there a nice GUI for that? I can get the disassembly of any
method on the call stack using strictly GUI, what's the problem with
allowing me to see any method, or at least those that were JITted already?

2. OK, I've got the address, now I need to set a breakpoint in the code for
which I don't have a source. No GUI stuff understands the address that I was
able to torture out of the SOS. !bpmd sorta works - at least it says that it
found the method and set the breakpoint, but the VS 2005 doesn't show it in
its Breakpoints window and doesn't stop there. Any suggestions?

Best regards,
Michael Domashchenko

> Hi,
>
[quoted text clipped - 28 lines]
> ---------------------------------------------------------------------------
> It is my pleasure to be of any assistance.
"Wei-Dong XU [MSFT]" - 14 Mar 2006 07:53 GMT
Hi,

Thanks for the replying!

" Why is not there a nice GUI for that? "
As I know, since the assembly code of .Net application is dynamically
generated, the VS.net debugger faces one problem that the managed debugging
and unmanaged debugging. Generally speaking, the developers in VS.net will
directly set the break point at the VS.net Text editor using F9 key or the
debug menu. Then we only need to pay attention to the C# code, not the low
level assembly code. If you would like to make a suggestion regarding this,
that will be greatly appreciated. Please provide your feed back at:
https://support.microsoft.com/common/survey.aspx?scid=sw;en;1214&showpage=1&
WS=mscom&url=http%3a%2f%2fwww.microsoft.com%2f

For the assembly code debugging (this is called unmanaged debugging), we
can use WinDBG to debug the code. The BPMD command can work very well at
WinDBG.

So currently this issue is about how VS.net handles the break points. We
are still researching this issue for you. If any update, I will post back
at the first time. Thanks!

Have a nice day!

Best Regards,
Wei-Dong XU
Microsoft Support
---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------------------
It is my pleasure to be of any assistance.
"Wei-Dong XU [MSFT]" - 15 Mar 2006 09:39 GMT
Hi,

Based on my research, the issue is that the SOS.dll(SOS.dll is one debugger
extension) doesnot provide this service in VS.net. As I know, it is because
the debugger extension support in VS2005 is a subset of the debugger
extension functionality that is in Windbg, then the bpmd command of SOS.dll
will not work in VS.net 2005; on the contrary, it works very well in
WinDbg.

Microsoft is very attentively listening every customer requirement every
day, I'd suggest please post this issue to our product feedback. The
product team will review your requirement so the suggestion may be taken
into the next version design or next service pack.

The feedback site link is:
https://support.microsoft.com/common/survey.aspx?scid=sw;en;1214&showpage=1&
WS=mscom&url=http%3a%2f%2fwww.microsoft.com%2f

Thanks a lot! Please feel free to let me know if you have any further
question on this issue.

Have a nice day!

Best Regards,
Wei-Dong XU
Microsoft Support
---------------------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------------------
It is my pleasure to be of any assistance.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.