New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr python3 #35
Pr python3 #35
Conversation
xrange is deprecated in Python3. builtins.range is the correct compatilibity layer for range functionality
As usual, some bytes/str incompatibilities.
Doing so allow us to import example scripts as modules.
That was done for PDB7RootStream but not for PDB2 (which is understandable since that PDB format is deprecated for 20 years)
PadAlign rely on ctx._pad. However this attribute may not be defined since _pad is a construct.Peek(Something) and Peek return None if the sub construct raise an Error (end of stream for example). It may be better to use an Adapter instead
…vinfo.h Microsoft is nice enough to finally provide documentation for pdb, we might as well use it.
Same as for basic types, leaf types enum is now public.
Wow, this is awesome! Thanks so much for putting this together! I'm going to run this by the Volatility folks since I believe pdbparse is still in their critical path, but it should be OK to merge after they verify it doesn't break their workflow :) |
I just realized my PR fixes those issues : |
I haven't heard back definitively from the Volatility folks, but they tell me that they will be switching to an LLVM-based parser from version 3, so I don't see any harm in merging this now. Thanks again for the PR! |
Whoops I've just noticed I haven't upstreamed the modifications on the undame C module for the support of Python3 compilation. I'll create another pull request right away. |
@@ -1099,16 +1100,16 @@ def enum_pretty_str(enum): | |||
structs = topological_sort(dep_graph) | |||
structs.reverse() | |||
|
|||
print "/******* Enumerations *******/" | |||
print ("/******* Enumerations *******/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be a space between print
and (
.
Hi,
I've ported your library over Python3 (believe it or not, people still preferentially use pdbparse when working with PDB). Sorry for the massive code changes, but it's not possible to do it incrementally.
I've tested it on:
2.7.6
and3.4.3
2.7.6
and3.5.2
There is probably still some kinks to iron out, even though I tried to be thorough (I even had to do some software archeology to get my hands on a pre-WinXP dll and pdb) :
(I've ignored
undecorate.py
,undname.py
andpostfix_eval.py
which not actually used by the library)Anyway, I'm at your disposal if you have any questions or suggestions about this PR.
L.