File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed
DbgProvider/public/Debugger Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ public override DbgModuleInfo Module
23
23
{
24
24
using ( new DbgEngContextSaver ( Debugger , Context ) )
25
25
{
26
- // TODO: this might not work for a managed module with public dbgeng ...
27
- // could we query clrmd or something? To see the point of failure,
28
- // search for 8b09cd08-2fb1-4f51-902f-bdd6f967b105
26
+ // TODO: this won't work for a managed module... we should use ClrMd
27
+ // to synthesize a DbgModuleInfo.
28
+ // https://github.com/Microsoft/DbgShell/issues/35
29
29
return Debugger . GetModuleByAddress ( m_clrMethod . Type . Module . ImageBase ) ;
30
30
}
31
31
}
Original file line number Diff line number Diff line change @@ -429,9 +429,9 @@ private static DEBUG_MODULE_PARAMETERS _GetModParamsByAddress( DbgEngDebugger de
429
429
uint index ;
430
430
ulong baseAddr ;
431
431
432
- // TODO: this might not work for a managed module with public dbgeng...
433
- // could we query clrmd or something? This is the actual point of
434
- // failure, c.f. 8b09cd08-2fb1-4f51-902f-bdd6f967b105
432
+ // TODO: If it's a managed module, this will fail. We could use
433
+ // ClrMd to synthesize this DbgModule instead.
434
+ // https://github.com/Microsoft/DbgShell/issues/35
435
435
StaticCheckHr ( ds . GetModuleByOffset2 ( addressInModule ,
436
436
0 , // start index
437
437
DEBUG_GETMOD . DEFAULT ,
Original file line number Diff line number Diff line change @@ -329,10 +329,26 @@ public override string ToString()
329
329
330
330
try
331
331
{
332
- if ( Displacement == 0 )
333
- return SymbolName ;
334
- else
335
- return Util . Sprintf ( "{0}+0x{1:x}" , SymbolName , Displacement ) ;
332
+ string disp = String . Empty ;
333
+
334
+ if ( Displacement != 0 )
335
+ {
336
+ disp = "+0x" + Displacement . ToString ( "x" ) ;
337
+ }
338
+
339
+ if ( null != ManagedFrame )
340
+ {
341
+ // TODO: Ideally we wouldn't deal with this at this layer; we would
342
+ // synthesize a DbgModuleInfo instead. But for now this is a handy
343
+ // workaround.
344
+ // https://github.com/Microsoft/DbgShell/issues/35
345
+
346
+ // It seems like dbgeng likes to replace dots in module names with
347
+ // underbars... why? I guess I should do the same?
348
+ return ManagedFrame . ModuleName . Replace ( '.' , '_' ) + "!" + ManagedFrame . Method . GetFullSignature ( ) + disp ;
349
+ }
350
+
351
+ return SymbolName + disp ;
336
352
}
337
353
catch ( DbgProviderException dpe )
338
354
{
You can’t perform that action at this time.
0 commit comments