0

Advanced .NET Debugging says that, when I run !Name2EE <executable name> I should get some output that includes the JITTED Code Address.

0:004>!name2ee 03Breakpoint.exe
Advanced.NET.Debugging.Chapter3.Breakpoint.AddAndPrint
Module: 00c2db8c (03Breakpoint.exe)
Token: 0x06000002
MethodDesc: 00c3178
Name:  Advanced.NET.Debugging.Chapter3.Breakpoint.AddAndPrint(Int32, Int32)
JITTED Code Address:  002a0178

The given syntax for the Name2EE function throws an error:

0:000> !Name2EE Breakpoint_x64.exe
Usage: !Name2EE module_name item_name
  or    !Name2EE module_name!item_name
       use * for module_name to search all loaded modules
Examples: !Name2EE  mscorlib.dll System.String.ToString
          !Name2EE *!System.String

It seems to need a wildcard in front of it. When I run this, I still don't get all the information though.

0:000> !Name2EE *!Breakpoints.Breakpoint
Module:      00007ff9530d1000
Assembly:    mscorlib.dll
--------------------------------------
Module:      00007ff8f57e4118
Assembly:    Breakpoint_x64.exe

Why doesn'y my output here have all the items in the first example, such as JITTED Code Address?

BanksySan
  • 27,362
  • 33
  • 117
  • 216
  • It's unclear, which part of your question is about the expected output, and which part refers to the actual output. You are also talking about an error which we never get to see. That needs to be fixed. – IInspectable Sep 23 '18 at 09:06
  • @IInspectable I've added more information. – BanksySan Sep 23 '18 at 10:38
  • `!Name2EE Breakpoint_x64.exe` clearly doesn't follow the command's syntax. Why did you expect it to succeed? Do you understand, what a module is? Do you understand, what designates a type or method name as expected by the [Name2EE](https://learn.microsoft.com/en-us/dotnet/framework/tools/sos-dll-sos-debugging-extension) command? Do you understand the abbreviation "JIT" (*"just in time"*)? .NET code only gets compiled when it is about to be executed. If the output doesn't show a JITTED Code Address, chances are, that it hasn't been compiled and executed. – IInspectable Sep 23 '18 at 11:42
  • @IInspectable I'm comfortable with the concept of JIT, but these debuggers are lower level than I've looked at before. I had just wondered if it might have been that it wasn't jitted yet. – BanksySan Sep 23 '18 at 11:56
  • @IInspectable The book I'm working through is very out of date, so it's a steep learning curve. I'm never sure if I'm doing something wrong of the book it out of date. The syntax in the book is `!name2ee 03Breakpoint.exe` which gives a syntax error. The rest is me trying to figure out what it should be. – BanksySan Sep 23 '18 at 12:01
  • 2
    The book apparently issues `!name2ee 03Breakpoint.exe Advanced.NET.Debugging.Chapter3.Breakpoint.AddAndPrint`, which follows the ` ` syntax. Outdated or not, you probably need to understand C code to make any use of the debugging tools presented in the book. – IInspectable Sep 23 '18 at 12:16
  • @IInspectable The formatting puts the `Advanced.NET.Debugging.Chapter3.Breakpoint.AddAndPrint` on the next line, so I thought it was part of the output. Thanks, that makes sense now. – BanksySan Sep 23 '18 at 12:43
  • Did you get this to work? I just checked and it works as expected for me. – Brian Rasmussen Dec 18 '18 at 13:20
  • @BrianRasmussen The book formats the line badly, it has that one command over two lines without any indication that it's actually one line. – BanksySan Dec 18 '18 at 15:18

0 Answers0