这些函数名称中的点是什么原因造成的

What accounts for the dots in the names of these functions

我正在调试为什么我的 Boost.Python 模块无法在 Ubuntu 中加载。有趣的是,问题出现在之前 我的模块实际加载。一个简单的 foo C++ 模块证实了这一点。堆栈跟踪显示了对 boost::python::* 的调用,这些调用在我们较大的库中是不存在的。因此,我知道段错误发生在我的模块被尝试之前。

下面的堆栈跟踪是针对发生段错误的失败库。我的问题是,函数名称中的 是什么?并非所有功能都有它们。例如,帧 #62 0x0000000000547692 in PyErr_PrintEx.part.3.42666 ()。我可以 grep 通过 Python 来源并找到 PyErr_PrintEx,但我没有找到其余的。那是什么?

#0  0x0000000002344596 in ?? ()
No symbol table info available.
#1  0x00007f5f02d72258 in std::string::_S_construct<char const*> (__beg=
    0x7f5efb565f46 "amd64", __end=0x7f5efb565f4b "", __a=...)
    at /usr/include/c++/4.6/bits/basic_string.tcc:134
        __dnew = 116
        __r = 0x7
#2  0x00007f5efdf505e3 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3  0x00007f5efb4ebdfe in pkgInitConfig(Configuration&) ()
   from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
No symbol table info available.
#4  0x00007f5efb7aa395 in ?? ()
   from /usr/lib/python2.7/dist-packages/apt_pkg.so
No symbol table info available.
#5  0x000000000056d4a4 in PyEval_EvalFrameEx ()
No locals.
#6  0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#7  0x0000000000568e58 in PyImport_ExecCodeModuleEx ()
No locals.
#8  0x000000000042bf11 in load_source_module.39049 ()
No locals.
#9  0x0000000000566f80 in load_package.39142 ()
No locals.
#10 0x000000000042c90b in import_submodule.39103 ()
No locals.
#11 0x000000000046895d in load_next.39108 ()
No locals.
#12 0x000000000042d164 in import_module_level.isra.3.39129 ()
No locals.
#13 0x00000000005167db in builtin___import__.32784 ()
No locals.
#14 0x000000000043a8b6 in PyObject_Call ()
No locals.
#15 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#16 0x000000000056f95b in PyEval_EvalFrameEx ()
No locals.
#17 0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#18 0x0000000000568e58 in PyImport_ExecCodeModuleEx ()
No locals.
#19 0x000000000042bf11 in load_source_module.39049 ()
No locals.
#20 0x000000000042c90b in import_submodule.39103 ()
No locals.
#21 0x00000000004688d3 in load_next.39108 ()
No locals.
#22 0x000000000042d326 in import_module_level.isra.3.39129 ()
No locals.
#23 0x00000000005167db in builtin___import__.32784 ()
No locals.
#24 0x000000000043a8b6 in PyObject_Call ()
No locals.
#25 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#26 0x000000000056f95b in PyEval_EvalFrameEx ()
No locals.
#27 0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#28 0x0000000000568e58 in PyImport_ExecCodeModuleEx ()
No locals.
#29 0x000000000042bf11 in load_source_module.39049 ()
No locals.
#30 0x000000000042c90b in import_submodule.39103 ()
No locals.
#31 0x00000000004688d3 in load_next.39108 ()
No locals.
#32 0x000000000042d326 in import_module_level.isra.3.39129 ()
No locals.
#33 0x00000000005167db in builtin___import__.32784 ()
No locals.
#34 0x000000000043a8b6 in PyObject_Call ()
No locals.
#35 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#36 0x000000000056f95b in PyEval_EvalFrameEx ()
No locals.
#37 0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#38 0x0000000000568e58 in PyImport_ExecCodeModuleEx ()
No locals.
#39 0x000000000042bf11 in load_source_module.39049 ()
No locals.
#40 0x000000000042c90b in import_submodule.39103 ()
No locals.
#41 0x00000000004688d3 in load_next.39108 ()
No locals.
#42 0x000000000042d326 in import_module_level.isra.3.39129 ()
No locals.
#43 0x00000000005167db in builtin___import__.32784 ()
No locals.
#44 0x000000000043a8b6 in PyObject_Call ()
No locals.
#45 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#46 0x000000000056f95b in PyEval_EvalFrameEx ()
No locals.
#47 0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#48 0x0000000000568e58 in PyImport_ExecCodeModuleEx ()
No locals.
#49 0x000000000042bf11 in load_source_module.39049 ()
No locals.
#50 0x0000000000566f80 in load_package.39142 ()
No locals.
#51 0x000000000042c90b in import_submodule.39103 ()
No locals.
#52 0x00000000004688d3 in load_next.39108 ()
No locals.
#53 0x000000000042d164 in import_module_level.isra.3.39129 ()
No locals.
#54 0x00000000005167db in builtin___import__.32784 ()
No locals.
#55 0x000000000043a8b6 in PyObject_Call ()
No locals.
#56 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#57 0x000000000056f95b in PyEval_EvalFrameEx ()
No locals.
#58 0x00000000005747c0 in PyEval_EvalCodeEx ()
No locals.
#59 0x00000000005697b0 in function_call ()
No locals.
#60 0x000000000043a8b6 in PyObject_Call ()
No locals.
#61 0x000000000043b626 in PyEval_CallObjectWithKeywords ()
No locals.
#62 0x0000000000547692 in PyErr_PrintEx.part.3.42666 ()
No locals.
#63 0x000000000056ae1f in PyRun_InteractiveOneFlags ()
No locals.
#64 0x000000000056b155 in PyRun_InteractiveLoopFlags ()
No locals.
#65 0x000000000056bedc in Py_Main ()
No locals.
#66 0x00007f5f04ae576d in __libc_start_main (main=0x41bae0 <main>, argc=1, 
    ubp_av=0x7fff11b14a38, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fff11b14a28) at libc-start.c:226
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 8540347331300905646, 
                4307688, 140733490219568, 0, 0, -8540148959998029138, 
                -8630196532358589778}, mask_was_saved = 0}}, priv = {pad = {
    0x0, 0x0, 0x57d430, 0x7fff11b14a38}, data = {prev = 0x0, cleanup = 0x0, 
              canceltype = 5755952}}}
        not_first_call = <optimized out>
#67 0x000000000041bb11 in _start ()
No locals.

.part 形式来自 GCC 优化。 GCC 有时会将一个函数拆分为多个部分,以便更好地内联一个部分。

例如,一个函数的测试可能会导致快速情况和慢速情况。在这种情况下,GCC 可能会选择将测试和快速案例放入一个小的可内联函数中,然后将慢速案例放入 .part 函数中。这样可以将快速路径内联到调用者中。