forked from qt-creator/qt-creator
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:
@@ -36,6 +36,7 @@ import inspect
|
|||||||
import traceback
|
import traceback
|
||||||
import linecache
|
import linecache
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
import platform
|
||||||
|
|
||||||
class QuitException(Exception):
|
class QuitException(Exception):
|
||||||
pass
|
pass
|
||||||
@@ -248,6 +249,8 @@ class Dumper:
|
|||||||
if not canonic:
|
if not canonic:
|
||||||
canonic = os.path.abspath(filename)
|
canonic = os.path.abspath(filename)
|
||||||
canonic = os.path.normcase(canonic)
|
canonic = os.path.normcase(canonic)
|
||||||
|
if platform.system() in ('Microsoft', 'Windows'):
|
||||||
|
canonic = canonic.replace('\\', '/')
|
||||||
self.fncache[filename] = canonic
|
self.fncache[filename] = canonic
|
||||||
return canonic
|
return canonic
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user