无论模板参数如何,哪些std::map方法是相同的(并且可能共享符号)
Which std::map methods are identical (and might share symbols) regardless of template parameters?
我有一个崩溃转储,我试图分析(vc++ 2010)。
然后我有一个调用栈,看起来像这样(为了可读性,我在这里做了很多调整):myapp.exe!std::_Tree<std::_Tmap_traits<unsigned int,StructB,std::less<unsigned int> ... >::_Erase(...)
myapp.exe!std::_Tree<std::_Tmap_traits<unsigned int,StructA,std::less<unsigned int>,... >::clear()
(clear() calls _Erase())
注意值的模板形参的区别(StructA和StructB)。现在,我知道具有完全相同二进制的不同方法可以在PDB中具有相同的符号,即使它们实际上使用不同的代码。我假设这里就是这种情况(std::map::_Erase无论值类型如何都是相同的)。
但是我怎么知道呢?是否有一个stl方法列表(对于这个MS实现)适用于此?会不会是某种bug?
更新:
查看PDB(在文本编辑器中),我看到许多std::map<…>::_Erase,我在StructA和StructB中都看到了它们。我不知道这是否意味着折叠。
此外,std::map的反汇编代码显示了对一个地址的调用,该地址被解释为std::map。我猜这意味着代码折叠…
您可以使用/OPT:NOICF
禁用代码折叠行为。
最后,我创建了一个地图文件进行重建。在映射文件中,我可以看到两个方法(_Erase for StructA和_Erase for StructB)都有相同的地址。所以这不是bug
相关文章:
- 为什么我的共享库中存在展开符号
- 仅在少数方法(静态或共享库)中解析的外部符号
- 共享对象、符号、C/C++ 库链接和加载
- 共享对象中的符号
- 如何防止 CMake 在构建时(而不是在安装时)为共享库创建符号链接?
- 使用共享库编译可执行文件时仅链接所需的符号
- 为什么 std:: 符号在共享库中被强制导出?
- 使用 C++ 标准库避免共享库中的符号冲突
- 隐藏共享库中的"_init"和"_fini"符号
- 共享对象中的符号名称与文件中.cpp函数不同
- C++:在共享对象中调用抽象基类构造函数/未定义的符号
- 共享库中使用"使用命名空间"定义的符号错误
- GCC 中使用 -O3 的共享库编译不会导出与 -O0 中那样多的符号
- Cython:共享对象中未定义的符号
- 不同的数学符号绑定与共享库与 dlopen 并直接链接到可执行文件 (Linux)
- 尝试与从 CUDA 对象构建的共享库链接时未定义的符号
- 在链接链接静态(GSOAP)库的共享库时,为什么会得到一个未定义的符号
- 共享库中非模板基的模板子类导致未定义的符号类型信息'class'链接错误
- 静态库将转换为共享的lib符号隐藏
- 在共享C++库中加载共享库时C++未定义的符号,该库本身由 Python 加载