Function to mangle/demangle functions(用于处理/解调函数的函数)
问题描述
我之前在这里表明C++函数并不容易代表大会.现在我有兴趣以一种或另一种方式阅读它们,因为 Callgrind 是 Valgrind 的一部分,在组装时显示它们已损坏.
所以我想要么破坏 Valgrind 函数输出,要么破坏函数的程序集名称.有没有人尝试过这样的事情?我正在查看 网站 并发现以下内容:
<块引用>实现解压缩的代码是 GNU Binutils 包的一部分;参见 libiberty/cplus-dem.c 和 include/demangle.h.
有没有人试过这样的东西?我想在 C 中进行 demangle/mangle.
我的编译器是 gcc 4.x.
使用 c++filt
命令行工具对名称进行解调.
I have previously, here, been shown that C++ functions aren't easily represented in assembly. Now I am interested in reading them one way or another because Callgrind, part of Valgrind, show them demangled while in assembly they are shown mangled.
So I would like to either mangle the Valgrind function output or demangle the assembly names of functions. Anyone ever tried something like that? I was looking at a website and found out the following:
Code to implement demangling is part of the GNU Binutils package; see libiberty/cplus-dem.c and include/demangle.h.
Has anyone ever tried something like that? I want to demangle/mangle in C.
My compiler is gcc 4.x.
Use the c++filt
command line tool to demangle the name.
这篇关于用于处理/解调函数的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:用于处理/解调函数的函数


基础教程推荐
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 常量变量在标题中不起作用 2021-01-01
- 我有静态或动态 boost 库吗? 2021-01-01
- 这个宏可以转换成函数吗? 2022-01-01