Beispiel #1
0
 def test_pdbs( self ):
     for f in filter( lambda f: f.endswith( 'pdb' ), os.listdir( r'E:\pdbs' ) ):
         try:
             reader = pdb.decl_loader_t( f )
             reader.read()
             f = file( d + '.txt', 'w+' )
             declarations.print_declarations( reader.global_ns, writer=lambda line: f.write(line+'\n') )
             f.close()
         except Exception, error:
             print 'unable to load pdb file ', f, ' Error: ', str(error)
Beispiel #2
0
 def test_pdbs(self):
     for f in filter(lambda f: f.endswith('pdb'), os.listdir(r'E:\pdbs')):
         try:
             reader = pdb.decl_loader_t(f)
             reader.read()
             f = file(d + '.txt', 'w+')
             declarations.print_declarations(
                 reader.global_ns, writer=lambda line: f.write(line + '\n'))
             f.close()
         except Exception, error:
             print 'unable to load pdb file ', f, ' Error: ', str(error)
Beispiel #3
0
    def test_create_nss(self):
        reader = pdb.decl_loader_t( self.pdb_file )
        print reader.symbols_table.name
        reader.read()
        f = file( 'decls.cpp', 'w+' )
        declarations.print_declarations( reader.global_ns, writer=lambda line: f.write(line+'\n') )
        f.close()

        f = file( 'symbols.txt', 'w+')
        for smbl in reader.symbols.itervalues():
            f.write( smbl.uname )
            f.write( os.linesep )
            f.write( '\t' + str(smbl.name) )
        f.close()
Beispiel #4
0
    def test_create_nss(self):
        reader = pdb.decl_loader_t(self.pdb_file)
        print reader.symbols_table.name
        reader.read()
        f = file('decls.cpp', 'w+')
        declarations.print_declarations(
            reader.global_ns, writer=lambda line: f.write(line + '\n'))
        f.close()

        f = file('symbols.txt', 'w+')
        for smbl in reader.symbols.itervalues():
            f.write(smbl.uname)
            f.write(os.linesep)
            f.write('\t' + str(smbl.name))
        f.close()
Beispiel #5
0
class cxx_parsers_cfg:

    keywd = {
        'working_directory': data_directory,
        'define_symbols': [gccxml_version],
        'compiler': compiler
    }

    if os.path.exists( os.path.join( gccxml_path, 'gccxml' ) ) \
       or os.path.exists( os.path.join( gccxml_path, 'gccxml.exe' ) ):
        keywd['gccxml_path'] = gccxml_path
    gccxml = pygccxml.parser.gccxml_configuration_t(**keywd)

    pdb_loader = None
    if sys.platform == 'win32':
        from pygccxml.msvc import pdb
        pdb_file = os.path.join(data_directory, 'msvc_build', 'Debug',
                                'msvc_build.pdb')
        if os.path.exists(pdb_file):
            pdb_loader = pdb.decl_loader_t(pdb_file)
            pdb_loader.read()