microsoft / ConcordExtensibilitySamples

Visual Studio Debug Engine Extensibility Samples
Other
122 stars 50 forks source link

How can I get resolved DkmInstructionAddress on Target computer component? #64

Open NoldIT opened 3 years ago

NoldIT commented 3 years ago

Hello, I would like to get DkmCustomInstructionAddress from the interface function "OnEmbeddedBreakpoint" which is implemented in the component "A" of target computer (Levels Values < 99,999).

"A" component inserts "TRAP" in the instruction stream. As a result, It received "OnEmbeddedBreakpointHit" with a DkmUnknownInstructionAddress. Is there any simple ways to get the resolved DkmCustomInstructionAddress on the target computer component? IDkmInstructionAddressResolver is implemented by an IDE component.

What I have tried are as follows.

  1. Implement "IDkmInstructionAddressProvider" interface in a IDE component. - Not Working.
  2. Call DkmProcess.GetInstructionAddress. - NotImplementedException is thrown.
  3. Implement "IDkmEmbeddedBreakpointHitNotifier" interface in a IDE component "B" and call thread.OnEmbeddedBreakpointHit. However the notification was received by only the components whose level is higher than the level of "B" component.

I hope to find a simple way so that makes easy to implement stepper.

Thanks.