当前位置: 首页>>代码示例>>C++>>正文


C++ BPatch_function::getMangledName方法代码示例

本文整理汇总了C++中BPatch_function::getMangledName方法的典型用法代码示例。如果您正苦于以下问题:C++ BPatch_function::getMangledName方法的具体用法?C++ BPatch_function::getMangledName怎么用?C++ BPatch_function::getMangledName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BPatch_function的用法示例。


在下文中一共展示了BPatch_function::getMangledName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ShowFunctions

static void ShowFunctions (BPatch_image *appImage)
{
    BPatch_Vector<BPatch_function *> *vfunctions = appImage->getProcedures (false);
    cout << PACKAGE_NAME << ": " << vfunctions->size() << " functions found in binary " << endl;

    unsigned i = 0;
    while (i < vfunctions->size())
    {
        char name[1024];
        BPatch_function *f = (*vfunctions)[i];

        f->getName (name, 1024);

        if (VerboseLevel)
        {
            char mname[1024], tname[1024], modname[1024];
            f->getMangledName (mname, 1024);
            f->getTypedName (tname, 1024);
            f->getModuleName (modname, 1024);

            cout << " * " << i+1 << " of " << vfunctions->size() << ", Name: " << name << endl
                 << "    Mangled Name: " << mname << endl
                 << "    Typed Name  : " << tname << endl
                 << "    Module name : " << modname << endl
                 << "    Base address: " << f->getBaseAddr() << endl
                 << "    Instrumentable? " << (f->isInstrumentable()?"yes":"no") << endl
                 << "    In shared library? " << (f->isSharedLib()?"yes":"no") << endl
                 << "    Number of BB: " << getBasicBlocksSize(f) << endl; 

            if (f->isSharedLib())
            {
                char sharedlibname[1024];
                BPatch_module *mod = f->getModule();

                mod->getFullName (sharedlibname, 1024);
                cout << "    Full library name: " << sharedlibname << endl;
                
            }
            cout << endl;
        }
        else
        {
            cout << name << endl;
        }

        i++;
    } 
}
开发者ID:polca-project,项目名称:polca-toolbox,代码行数:48,代码来源:extrae.C

示例2: ShowFunctions

static void ShowFunctions (BPatch_image *appImage)
{
    BPatch_Vector<BPatch_function *> *vfunctions = appImage->getProcedures (false);
    cout << PACKAGE_NAME << ": " << vfunctions->size() << " functions found in binary " << endl;

    unsigned i = 0;
    while (i < vfunctions->size())
    {
        char name[1024];
        BPatch_function *f = (*vfunctions)[i];

        f->getName (name, 1024);

        char mname[1024], tname[1024], modname[1024];
        f->getMangledName (mname, 1024);
        f->getTypedName (tname, 1024);
        f->getModuleName (modname, 1024);

        cout << " * " << i+1 << " of " << vfunctions->size() << ", Name: " << name << endl
             << "    Mangled Name: " << mname << endl
             << "    Typed Name  : " << tname << endl
             << "    Module name : " << modname << endl
             << "    Base address: " << f->getBaseAddr() << endl
             << "    Instrumentable? " << (f->isInstrumentable()?"yes":"no") << endl
             << "    In shared library? " << (f->isSharedLib()?"yes":"no") << endl;

        if (f->isSharedLib())
        {
            //Old Dyninst API < 9.x
            //char sharedlibname[1024];
            //mod->getFullName (sharedlibname, 1024);

            BPatch_module *mod = f->getModule();

            string sharedlibname;
            sharedlibname = mod->getObject()->name();
            cout << "    Full library name: " << sharedlibname << endl;
        }
        cout << endl;

        i++;
    } 
}
开发者ID:bsc-performance-tools,项目名称:extrae,代码行数:43,代码来源:extrae-test-dyninst.C


注:本文中的BPatch_function::getMangledName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。