Skip to content
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

new base type in visual studio 12? #16

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment
Open

new base type in visual studio 12? #16

GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

we encountered an error parsing a pdb created by visual studio 12

$ python pdb_tpi_vtypes.py ConsoleApplication1.pdb 
Traceback (most recent call last):
  File "pdb_tpi_vtypes.py", line 157, in <module>
    pdb.STREAM_TPI.load()
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/__init__.py", line 221, in load
    tpis = tpi.parse_stream(self.stream_file,unnamed_hack,elim_fwdrefs)
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/tpi.py", line 1081, in parse_stream
    resolve_typerefs(t, types, min) for t in types[i].substructs
  File "/usr/local/lib/python2.7/dist-packages/pdbparse/tpi.py", line 1013, in resolve_typerefs
    setattr(leaf, attr, base_type._decode(ref,{}))
  File "/usr/local/lib/python2.7/dist-packages/construct-2.5.1-py2.7.egg/construct/adapters.py", line 99, in _decode
    obj, self.subcon.name))
construct.adapters.MappingError: no decoding mapping for 12 [base_type]

The same exe compiled with visual studio 2010 is handled fine. i attached both 
the problematic one (ConsoleApplication1.pdb) and the one that is ok 
(ConsoleApplication1_vc2010.pdb)

Original issue reported on code.google.com by [email protected] on 12 Nov 2013 at 1:24

Attachments:

@GoogleCodeExporter
Copy link
Author

If you look at the thing it's trying to parse, it seems pretty clear something 
has gone more fundamentally wrong:

{'leaf_type': 'LF_FIELDLIST',
 'length': 70,
 'substructs': [{'fldattr': {'access': 'public',
    'compgenx': False,
    'mprop': 'MTvanilla',
    'noconstruct': False,
    'noinherit': False,
    'pseudo': False},
   'index': {'count': 0,
    'derived': 'T_NOTYPE',
    'fieldlist': 'T_NOTYPE',
    'leaf_type': 'LF_STRUCTURE',
    'length': 38,
    'name': 'Enum',
    'prop': {'cnested': False,
     'ctor': False,
     'fwdref': True,
     'isnested': False,
     'opassign': False,
     'opcast': False,
     'ovlops': False,
     'packed': False,
     'reserved': 1,
     'scoped': False},
    'size': 0,
    'tpi_idx': 5125,
    'vshape': 'T_NOTYPE'},
   'leaf_type': 'LF_BCLASS',
   'name': '\xf2\xf1\x11\x15\x1b',
   'offset': 0},
  {'leaf_type': 'LF_VFUNCTAB', 'type': 12}],
 'tpi_idx': 5138}

The name is garbage that looks like it includes the padding of one of the value 
types. So I'd guess something about the type stream has changed in VS2012, but 
I can't say what without looking into it more deeply.

Original comment by [email protected] on 3 Apr 2014 at 8:49

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant