moyix / pdbparse

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

PDB Parse Exception: NumberOfRelocations would be overwritten #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python pdb_print_ctypes.py WinXPSP2/Symbols/dll/ntdll.pdb

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "pdb_print_ctypes.py", line 1033, in <module>
    pdb = pdbparse.parse(args[0])
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 477, in parse
    return PDB7(f, fast_load)
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 444, in __init__
    self.read_root(self.root_stream)
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 390, in read_root
    parent=self))
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 119, in __init__
    else: self.load()
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 301, in load
    self.sections = pe.Sections.parse(self.data)
  File "/usr/local/lib/python2.7/dist-packages/construct-2.5.0-py2.7.egg/construct/core.py", line 187, in parse
    return self.parse_stream(BytesIO(data))
  File "/usr/local/lib/python2.7/dist-packages/construct-2.5.0-py2.7.egg/construct/core.py", line 197, in parse_stream
    return self._parse(stream, Container())
  File "/usr/local/lib/python2.7/dist-packages/construct-2.5.0-py2.7.egg/construct/core.py", line 519, in _parse
    obj.append(self.subcon._parse(stream, context))
  File "/usr/local/lib/python2.7/dist-packages/construct-2.5.0-py2.7.egg/construct/core.py", line 664, in _parse
    raise OverwriteError("%r would be overwritten but allow_overwrite is False" % (sc.name,))
construct.core.OverwriteError: 'NumberOfRelocations' would be overwritten but 
allow_overwrite is False

What version of the product are you using? On what operating system?
Python 2.7; Construct 2.5; and SVN head version of pdbparse

Original issue reported on code.google.com by carl.pulley on 21 Mar 2013 at 10:17

GoogleCodeExporter commented 9 years ago
Revisiting this issue using another machine, I'm able to now get viable output 
being generated. 

I suspect that the above errors were caused by a "mangled" installation by 
myself!

Original comment by carl.pulley on 31 Mar 2013 at 10:25

GoogleCodeExporter commented 9 years ago
Glad things are working for you now -- I'll close the issue and we can reopen 
it if you run into the problem again.

Original comment by moo...@gmail.com on 11 Apr 2013 at 3:43

GoogleCodeExporter commented 9 years ago
I just moved to a Wheezy box and I'm experiencing the same issue. On Squeeze 
with Python 2.6 everything seems to be in order. My setup is the same as what 
Carl described above.

Original comment by tamas.k....@gmail.com on 29 Apr 2013 at 4:36

GoogleCodeExporter commented 9 years ago
Hi Tamas,
  in my case, it was a mixed Python environment that was causing the issue - I was using an OSX machine and suspect/guess that OSX installed python packages and homebrew installed python packages were interfering with each other in some way(?).

Once I had ensured that homebrew python (and not OSX python) was being used, I 
then had to ensure that pdbparse, construct and pefile were being picked up 
correctly (I wimped out and did a pip uninstall followed by a reinstall). This 
resolved the issue for myself.

The other thing that might be worth watching out for is a pip install pdbparse 
followed by a svn based install - this might be also be causing some package 
based confusion if the above is not helpful in your case?

Hope that helps,

  Carl.

Original comment by carl.pulley on 29 Apr 2013 at 5:27

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r105.

Original comment by moo...@gmail.com on 18 Jun 2013 at 9:29