moyix / pdbparse

Python code to parse Microsoft PDB files
Other
316 stars 84 forks source link

TypeError: unsupported operand type(s) for /: 'str' and 'str' #52

Closed automatedbugreportingfacility closed 3 years ago

automatedbugreportingfacility commented 4 years ago

Python 3.8.1

>>> print(construct.__version__)
2.9.45

Code (from dbi.py):

def parse_stream(stream):
(...)
    for i in range(0, fileIndex.cMod):
        these = []
        for j in range(modStart[i], modStart[i] + cRefCnt[i]):
            Name = "Name" / CString(encoding = "utf8").parse(Names[NameRef[j]:])
            files.append(Name)
            these.append(Name)
        modules.append(these)

Error:

>>> pdb.STREAM_DBI.load()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\[...]\pdbparse\__init__.py", line 276, in load
    debug = dbi.parse_stream(self.stream_file)
  File "C:\[...]\pdbparse\dbi.py", line 160, in parse_stream
    Name = "Name" / CString(encoding = "utf8").parse(Names[NameRef[j]:])
TypeError: unsupported operand type(s) for /: 'str' and 'str'