Pdb: Fix missing marker for locations on Windows

When parsing the file path of location information the
GdbMi parser expects UNIX-style formatted paths.
When debugging with the pdb on Windows we reported
Windows-style paths which in turn made the parser fail
and the stack never contained a file name and the
current location also had never a marker displayed.

Change-Id: I5216bbaf39ceead63efe8426561f132de3cd04a2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2019-07-22 11:00:22 +02:00
parent 5add218181
commit 90392397cb

View File

@@ -36,6 +36,7 @@ import inspect
import traceback
import linecache
import fnmatch
import platform
class QuitException(Exception):
pass
@@ -248,6 +249,8 @@ class Dumper:
if not canonic:
canonic = os.path.abspath(filename)
canonic = os.path.normcase(canonic)
if platform.system() in ('Microsoft', 'Windows'):
canonic = canonic.replace('\\', '/')
self.fncache[filename] = canonic
return canonic