# This code is in the public domain
#-------------------------------------------------------------------------------
import argparse
-import os, sys, posixpath
+import os, sys
import traceback
# For running from development directory. It should take precedence over the
if dir_index >= 0:
dir = bytes2str(includes[dir_index])
if dir.startswith('.'):
- dir = posixpath.join(_cu_comp_dir(cu), dir)
+ dir = os.path.join(_cu_comp_dir(cu), dir)
else:
dir = _cu_comp_dir(cu)
file_name = bytes2str(file_entry.name)
else:
raise DWARFError("Invalid source filename entry index in a decl_file attribute")
- return "\"%s\"" % (posixpath.join(dir, file_name),)
+ return "\"%s\"" % (os.path.join(dir, file_name),)
def _desc_ranges(attr, die):
if platform.system() == "Darwin": # MacOS
raise NotImplementedError("Not supported on MacOS")
elif platform.system() == "Windows":
- raise NotImplementedError("Not supported on Windows")
+ # Point the environment variable DWARFDUMP at a Windows build of llvm-dwarfdump
+ DWARFDUMP_PATH = os.environ.get('DWARFDUMP', "llvm-dwarfdump.exe")
else:
DWARFDUMP_PATH = 'test/external_tools/llvm-dwarfdump'