[英]Unknown code showing in GDB step through
I was running GDB and while stepping through some simple C++ code, it started displaying the code below. 我正在运行GDB,在逐步完成一些简单的C ++代码时,它开始显示下面的代码。 Does anybody have any clues as to what this code is? 有没有人知道这段代码是什么?
_Unwind_SjLj_Register (fc=0x28feac) at ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c:126 126 ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c: No such file or directory. in ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c (gdb) step 128 in ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c (gdb) step 131 in ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c (gdb) step 133 in ../../../../src/gcc-4.6.1/libgcc/../gcc/unwind-sjlj.c
From the source code (don't know if that's the exact version you're using, but should be close enough to get the idea): 从源代码 (不知道这是你正在使用的确切版本,但应该足够接近以获得想法):
//
// Called at start of each function that catches exceptions
//
EXPORT void _Unwind_SjLj_Register(struct _Unwind_FunctionContext* fc)
{
fc->prev = __Unwind_SjLj_GetTopOfFunctionStack();
__Unwind_SjLj_SetTopOfFunctionStack(fc);
}
Generally, there's quite a lot of stuff that happens in compiled C++ code under the hood. 通常,在编译的C ++代码中会发生很多事情。 When you step through the code, you often encounter cryptically-named compiler-generated functions, library functions like the one you've come across, etc. 当您单步执行代码时,您经常会遇到加密命名的编译器生成的函数,库函数,例如您遇到的函数等。
unwind
通常表示异常处理代码,所以看起来你已经指令步入了一个throw
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.