SNSystems / dexter

DExTer - Debug Experience Tester

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dexter can't identify when it's stepped into the right source files

jmorse opened this issue · comments

I have a problem with this code [0], which seems to be designed to make the debugger "continue" if we're not yet in a correct source file. On windows under dbgeng, step_info.current_location.path is

 c:\users\jmorse\source\debuginfo-tests\dexter-tests\hello.c

And self.context.options.source_files is

['C:\\Users\\gbmorsej\\source\\o\\debuginfo-tests\\dexter-tests\\hello.c']

Which are two very different strings. The symptom is that dbgeng doesn't implement "go"; but even if it did, this would still be broken.

Ultimately I don't think we should be trying to resolve the paths that the debugger coughs up into paths on the actual filesystem -- or if we do, we should make that the debugger drivers problem, not generic code.

[0]

if (step_info.current_frame

Aaaannnddd, this turns out to be necessary for things like lldb to not be infinitely stepping through the implementation of printf and the like. So this portion of code does need to be sticking around.

We should probably call os.path.normpath in that code that you highlighted to make sure that when comparing paths we're actually comparing like for like.

Ah, that might be a better / more general fix, I'll try that