-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTarget.CreateFromDebuggerInterface Throws Exception #32
Comments
Apologies for the delay in responding, it's been a busy week. I suppose this should be better documented, but CreateFromDebuggerInterface expects that you have set up IDebugClient in a way such that it is ready to be used. The HRESULT is the giveaway: 0x8000fff is the "catastrophic" error code that dbgeng hands out when it's not ready for the APIs that are called. The goal with this API is to allow you to construct a Here is a minimal example of it working properly:
Similarly, you can look in the ClrMD source's test infrastructure to see more examples of using DbgEng (specifically https://github.com/Microsoft/clrmd/blob/master/src/Microsoft.Diagnostics.Runtime.Tests/Debugger.cs and things that call it). However, DbgEng itself (IDebugClient and related interfaces) is a Microsoft library independent from ClrMD, so you should consult its documentation on how to use it... Does this address your concern? |
Hi Lee, Thanks, Keith Apologies for the delay in responding, it's been a busy week. I suppose this should be better documented, but CreateFromDebuggerInterface expects that you have set up IDebugClient in a way such that it is ready to be used. The HRESULT is the giveaway: 0x8000fff is the "catastrophic" error code that dbgeng hands out when it's not ready for the APIs that are called. The goal with this API is to allow you to construct a DataTarget from a DbgEng debugger session. Here is a minimal example of it working properly: using Microsoft.Diagnostics.Runtime; class Program
} Similarly, you can look in the ClrMD source's test infrastructure to see more examples of using DbgEng (specifically https://github.com/Microsoft/clrmd/blob/master/src/Microsoft.Diagnostics.Runtime.Tests/Debugger.cs and things that call it). However, DbgEng itself (IDebugClient and related interfaces) is a Microsoft library independent from ClrMD, so you should consult its documentation on how to use it... Does this address your concern? — |
When natively instantiating an instance of IDebugClient via DebugCreate, and then passing it into DataTarget.CreateFromDebuggerInterface method, the following exception is thrown:
Microsoft.Diagnostics.Runtime.ClrDiagnosticsException was unhandled
HResult (System.Exception)=-2128281598
HResult=-2128281598
Message=Failed to get proessor type, HRESULT: 8000ffff
Source=Microsoft.Diagnostics.Runtime
StackTrace:
at Microsoft.Diagnostics.Runtime.DbgEngDataReader.GetArchitecture()
at Microsoft.Diagnostics.Runtime.DataTargetImpl..ctor(IDataReader dataReader, IDebugClient client)
at Microsoft.Diagnostics.Runtime.DataTarget.CreateFromDebuggerInterface(IDebugClient client)
Using this code:
}
The text was updated successfully, but these errors were encountered: