- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
char_array.c
:
char arr[1];
int main(void) { printf("%s\n", arr); return 0; }
由 windbg 转储的 char_array.exe
中的符号:
0:000> x char_array!*
0040702c char_array!__security_cookie_complement = 0x44bf19b1
00407148 char_array!envp = 0x00000000
00405b08 char_array!uninit_postmsg = char [43] "' is being used without being initialized."
00407168 char_array!_RTC_ErrorReportFunc = 0x00000000
00407150 char_array!managedapp = 0n0
0040716c char_array!_RTC_ErrorReportFuncW = 0x00000000
00407174 char_array!_commode = 0n0
004068d0 char_array!__rtc_taa = <function> *[1]
00407178 char_array!_fmode = 0n0
004065c4 char_array!__rtc_iaa = <function> *[1]
00405000 char_array!__xc_a = <function> *[]
00405000 char_array!__xc_a = <function> *[1]
0040827c char_array!_imp____initenv = 0x10315760
00407030 char_array!mspdbName = 0x00405f88 "MSPDB80.DLL"
00405a98 char_array!_RTC_ErrorMessages = char *[6]
004074f4 char_array!__dyn_tls_init_callback = 0x00000000
00405618 char_array!__xi_z = <function> *[]
00405618 char_array!__xi_z = <function> *[1]
00407004 char_array!_RTC_ErrorLevels = int [5]
00407024 char_array!__native_vcclrit_reason = 0xffffffff
004071e8 char_array!GS_ContextRecord = struct _CONTEXT
00405410 char_array!pcinit = 0x00401240
004071e0 char_array!DebuggerWasPresent = 0n0
004074d0 char_array!__native_startup_lock = 0x00000000
00407170 char_array!_forceCRTManifestRTM = 0n0
00405e68 char_array!_RTC_errlist = char *[5]
00407020 char_array!__native_dllmain_reason = 0xffffffff
00407141 char_array!arr = char [1] ""
00407160 char_array!has_cctor = 0n0
0040715c char_array!mainret = 0n0
00407180 char_array!_newmode = 0n0
004082a8 char_array!_imp___adjust_fdiv = 0x103166cc
004074d4 char_array!__onexitend = 0x00000000
00405ab0 char_array!_RTC_NoFalsePositives = int [6]
00408248 char_array!_imp___onexit = 0x102cf660
0040530c char_array!__xi_a = <function> *[]
0040530c char_array!__xi_a = <function> *[1]
00407154 char_array!argret = 0n0
00406034 char_array!GS_ExceptionPointers = struct _EXCEPTION_POINTERS
0040714c char_array!argv = 0x00000000
004067cc char_array!__rtc_izz = <function> *[1]
00405208 char_array!__xc_z = <function> *[]
00405208 char_array!__xc_z = <function> *[1]
00407184 char_array!mspdb = 0x00000000
00407018 char_array!__globallocalestatus = 0n-2
004074e8 char_array!_adjust_fdiv = 0n0
00406ad8 char_array!__rtc_tzz = <function> *[1]
004064c0 char_array!__safe_se_handler_table = void *[]
00407190 char_array!GS_ExceptionRecord = struct _EXCEPTION_RECORD
00406040 char_array!_load_config_used = struct IMAGE_LOAD_CONFIG_DIRECTORY32_2
0040717c char_array!_dowildcard = 0n0
00405ac8 char_array!stack_premsg = char [28] "Stack around the variable '"
00407158 char_array!startinfo = struct _startupinfo
00407028 char_array!__security_cookie = 0xbb40e64e
00405af8 char_array!uninit_premsg = char [15] "The variable '"
0040701c char_array!__defaultmatherr = 0n1
004074e4 char_array!__onexitbegin = 0x00000000
00405514 char_array!pinit = 0x00401f10
00407164 char_array!wsprintffp = 0x00000000
00407144 char_array!argc = 0n0
00405104 char_array!pcppinit = 0x004012e0
004074c0 char_array!__native_startup_state = __uninitialized (0n0)
00405ae4 char_array!stack_postmsg = char [17] "' was corrupted."
004022f0 char_array!_FindPESection (unsigned char *, unsigned long)
00401040 char_array!_RTC_CheckEsp (void)
00401f70 char_array!_invoke_watson_if_error (int, wchar_t *, wchar_t *, wchar_t *, unsigned int, unsigned int)
00401790 char_array!failwithmessage (void *, int, int, char *)
00401a40 char_array!_RTC_StackFailure (void *, char *)
00401fd0 char_array!_RTC_Initialize (void)
00401e80 char_array!_RTC_GetErrorFunc (void *)
00401010 char_array!main (void)
00401de0 char_array!_RTC_NumErrors (void)
00401e60 char_array!_RTC_SetErrorFuncW (<function> *)
00401730 char_array!_RTC_Failure (void *, int)
00401670 char_array!DebuggerKnownHandle (void)
00401110 char_array!_RTC_CheckStackVars2 (void *, struct _RTC_framedesc *, struct _RTC_ALLOCA_NODE *)
004019a0 char_array!DebuggerRuntime (unsigned long, int, void *, wchar_t *)
00402150 char_array!atexit (<function> *)
00401e40 char_array!_RTC_SetErrorFunc (<function> *)
00402000 char_array!_RTC_Terminate (void)
00401f10 char_array!__CxxSetUnhandledExceptionFilter (void)
00401e90 char_array!_RTC_GetErrorFuncW (void *)
00402290 char_array!_ValidateImageBase (unsigned char *)
00401340 char_array!mainCRTStartup (void)
00401b40 char_array!_RTC_AllocaFailure (void *, struct _RTC_ALLOCA_NODE *, int)
00401fc0 char_array!_setargv (void)
004015b0 char_array!NtCurrentTeb (void)
004012e0 char_array!pre_cpp_init (void)
00401c80 char_array!_getMemBlockDataString (char *, char *, char *, unsigned int)
00401e10 char_array!_RTC_SetErrorType (_RTC_ErrorNumber, int)
004016a0 char_array!DebuggerProbe (unsigned long)
00401fb0 char_array!_matherr (struct _exception *)
00401360 char_array!__tmainCRTStartup (void)
00402970 char_array!__security_check_cookie (unsigned int)
00401ea0 char_array!__CxxUnhandledExceptionFilter (struct _EXCEPTION_POINTERS *)
00401cf0 char_array!_RTC_UninitUse (char *)
00401220 char_array!_RTC_Shutdown (void)
004024a0 char_array!_except_handler4 (struct _EXCEPTION_RECORD *, struct _EXCEPTION_REGISTRATION_RECORD *, struct _CONTEXT *, void *)
00401df0 char_array!_RTC_GetErrDesc (_RTC_ErrorNumber)
004010d0 char_array!_RTC_AllocaHelper (struct _RTC_ALLOCA_NODE *, unsigned int, struct _RTC_ALLOCA_NODE **)
00401f30 char_array!_setdefaultprecision (void)
00401070 char_array!_RTC_CheckStackVars (void *, struct _RTC_framedesc *)
004015c0 char_array!check_managed_app (void)
004024d0 char_array!_RTC_GetSrcLine (unsigned char *, wchar_t *, unsigned long, int *, wchar_t *, unsigned long)
00402790 char_array!GetPdbDll (void)
00401240 char_array!pre_c_init (void)
00402190 char_array!__security_init_cookie (void)
004029b0 char_array!__report_gsfailure (void)
00402040 char_array!_onexit (<function> *)
004011f0 char_array!_RTC_InitBase (void)
00402370 char_array!_IsNonwritableInCurrentImage (unsigned char *)
004081a8 char_array!_imp__FreeLibrary = <no type information>
00402ac4 char_array!InterlockedExchange = <no type information>
004082a0 char_array!_imp____p__fmode = <no type information>
00408290 char_array!_imp____getmainargs = <no type information>
00405e84 char_array!<CrtImplementationDetails>::NativeDll::ThreadAttach = <no type information>
00402afa char_array!GetProcAddress = <no type information>
0040826c char_array!_imp___initterm_e = <no type information>
00408274 char_array!_imp___CrtDbgReportW = <no type information>
004081d0 char_array!_imp__QueryPerformanceCounter = <no type information>
004081fc char_array!_imp__Sleep = <no type information>
004081f4 char_array!_imp__IsDebuggerPresent = <no type information>
0040216c char_array!_encode_pointer = <no type information>
004081bc char_array!_imp__HeapFree = <no type information>
004081e8 char_array!_imp__WideCharToMultiByte = <no type information>
0040828c char_array!_imp___exit = <no type information>
004081a4 char_array!_imp__TerminateProcess = <no type information>
00402172 char_array!__set_app_type = <no type information>
004081c0 char_array!_imp__GetSystemTimeAsFileTime = <no type information>
004082b4 char_array!_imp___CRT_RTC_INITW = <no type information>
00401038 char_array!printf = <no type information>
0040227e char_array!exit = <no type information>
004082ac char_array!_imp____setusermatherr = <no type information>
00408284 char_array!_imp___cexit = <no type information>
00402aee char_array!MultiByteToWideChar = <no type information>
004081e0 char_array!_imp__lstrlenA = <no type information>
004081cc char_array!_imp__GetTickCount = <no type information>
00402992 char_array!_unlock = <no type information>
004081d4 char_array!_imp__SetUnhandledExceptionFilter = <no type information>
00408294 char_array!_imp___amsg_exit = <no type information>
004081c4 char_array!_imp__GetCurrentProcessId = <no type information>
0040248e char_array!_initterm_e = <no type information>
00402980 char_array!terminate = <no type information>
00408000 char_array!_IMPORT_DESCRIPTOR_MSVCR90D = <no type information>
00405e88 char_array!<CrtImplementationDetails>::NativeDll::ThreadDetach = <no type information>
00408270 char_array!_imp___initterm = <no type information>
00402b00 char_array!LoadLibraryA = <no type information>
0040829c char_array!_imp___encode_pointer = <no type information>
00408208 char_array!KERNEL32_NULL_THUNK_DATA = <no type information>
00402ad6 char_array!IsDebuggerPresent = <no type information>
004081dc char_array!_imp__GetProcAddress = <no type information>
00401f9c char_array!__setusermatherr = <no type information>
00402284 char_array!_CrtSetCheckCount = <no type information>
0040299e char_array!_lock = <no type information>
00408250 char_array!_imp___except_handler4_common = <no type information>
00402b5a char_array!UnhandledExceptionFilter = <no type information>
0040825c char_array!_imp___unlock = <no type information>
00402aca char_array!Sleep = <no type information>
00408260 char_array!_imp___invoke_watson = <no type information>
00402b42 char_array!VirtualQuery = <no type information>
00408280 char_array!_imp__exit = <no type information>
00402abe char_array!_crt_debugger_hook = <no type information>
00408254 char_array!_imp___crt_debugger_hook = <no type information>
00402026 char_array!__p__commode = <no type information>
00402b18 char_array!GetCurrentThreadId = <no type information>
004081ac char_array!_imp__VirtualQuery = <no type information>
00402272 char_array!_XcptFilter = <no type information>
004081a0 char_array!_imp__GetCurrentProcess = <no type information>
0040824c char_array!_imp___lock = <no type information>
00402adc char_array!RaiseException = <no type information>
00408264 char_array!_imp___controlfp_s = <no type information>
004081b4 char_array!_imp__GetProcessHeap = <no type information>
00408268 char_array!_imp_?terminateYAXXZ = <no type information>
00402b3c char_array!GetModuleFileNameW = <no type information>
004081d8 char_array!_imp__LoadLibraryA = <no type information>
00402998 char_array!__dllonexit = <no type information>
004029a4 char_array!_decode_pointer = <no type information>
00402b1e char_array!GetCurrentProcessId = <no type information>
00408278 char_array!_imp___CrtSetCheckCount = <no type information>
004029aa char_array!_except_handler4_common = <no type information>
00402488 char_array!_initterm = <no type information>
00402b30 char_array!HeapAlloc = <no type information>
0040298c char_array!_invoke_watson = <no type information>
00408204 char_array!_imp__UnhandledExceptionFilter = <no type information>
004082b0 char_array!_imp___configthreadlocale = <no type information>
004081ec char_array!_imp__DebugBreak = <no type information>
004082c0 char_array!MSVCR90D_NULL_THUNK_DATA = <no type information>
004081f8 char_array!_imp__InterlockedCompareExchange = <no type information>
00401e96 char_array!_CRT_RTC_INITW = <no type information>
00402b24 char_array!GetSystemTimeAsFileTime = <no type information>
00401f24 char_array!_configthreadlocale = <no type information>
0040217e char_array!__getmainargs = <no type information>
00405e7c char_array!<CrtImplementationDetails>::NativeDll::ProcessDetach = <no type information>
00402ad0 char_array!InterlockedCompareExchange = <no type information>
00402b48 char_array!FreeLibrary = <no type information>
004081f0 char_array!_imp__RaiseException = <no type information>
00402af4 char_array!lstrlenA = <no type information>
00402b2a char_array!HeapFree = <no type information>
00402b36 char_array!GetProcessHeap = <no type information>
00405e80 char_array!<CrtImplementationDetails>::NativeDll::ProcessAttach = <no type information>
00408014 char_array!_IMPORT_DESCRIPTOR_KERNEL32 = <no type information>
00402482 char_array!_CrtDbgReportW = <no type information>
00402b12 char_array!GetTickCount = <no type information>
0040202c char_array!__p__fmode = <no type information>
004081e4 char_array!_imp__MultiByteToWideChar = <no type information>
00402986 char_array!_controlfp_s = <no type information>
004081b8 char_array!_imp__HeapAlloc = <no type information>
00402b06 char_array!SetUnhandledExceptionFilter = <no type information>
00402b4e char_array!TerminateProcess = <no type information>
004082b8 char_array!_imp___decode_pointer = <no type information>
004081c8 char_array!_imp__GetCurrentThreadId = <no type information>
00402178 char_array!_amsg_exit = <no type information>
00405e8c char_array!<CrtImplementationDetails>::NativeDll::ProcessVerifier = <no type information>
00408298 char_array!_imp____set_app_type = <no type information>
00402b54 char_array!GetCurrentProcess = <no type information>
00408288 char_array!_imp___XcptFilter = <no type information>
004082bc char_array!_imp__printf = <no type information>
00402278 char_array!_cexit = <no type information>
00402ae8 char_array!WideCharToMultiByte = <no type information>
00408200 char_array!_imp__InterlockedExchange = <no type information>
00402ae2 char_array!DebugBreak = <no type information>
00402b0c char_array!QueryPerformanceCounter = <no type information>
004082a4 char_array!_imp____p__commode = <no type information>
00408258 char_array!_imp____dllonexit = <no type information>
004081b0 char_array!_imp__GetModuleFileNameW = <no type information>
00408028 char_array!_NULL_IMPORT_DESCRIPTOR = <no type information>
0040226c char_array!_exit = <no type information>
我惊讶地发现,即使像上面这样一个空程序也有这么多符号,为什么?
最佳答案
MSVC 的 C 和 C++ 库在 main 之前和之后做了很多魔术。此外,您正在使用启用各种运行时检查的开关进行编译(这需要例如 _RTC* 符号)。您也有用于处理例如堆和调试构建错误报告机制。
“编译器魔术”术语中的“魔术”(编译器/工具链在幕后为您做的事情)包括例如
GetStartupInfo
、GetCommandLine
、GetEnvironmentStrings
)如果您在 Debug模式下构建此应用,并在 main
的开头设置断点,您将看到调用 main 的内容。通读例如__tmainCRTStartup
及其调用的函数。
关于c - 一个空模块有 228 个符号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5926799/
#include using namespace std; class C{ private: int value; public: C(){ value = 0;
这个问题已经有答案了: What is the difference between char a[] = ?string?; and char *p = ?string?;? (8 个回答) 已关闭
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 7 年前。 此帖子已于 8 个月
除了调试之外,是否有任何针对 c、c++ 或 c# 的测试工具,其工作原理类似于将独立函数复制粘贴到某个文本框,然后在其他文本框中输入参数? 最佳答案 也许您会考虑单元测试。我推荐你谷歌测试和谷歌模拟
我想在第二台显示器中移动一个窗口 (HWND)。问题是我尝试了很多方法,例如将分辨率加倍或输入负值,但它永远无法将窗口放在我的第二台显示器上。 关于如何在 C/C++/c# 中执行此操作的任何线索 最
我正在寻找 C/C++/C## 中不同类型 DES 的现有实现。我的运行平台是Windows XP/Vista/7。 我正在尝试编写一个 C# 程序,它将使用 DES 算法进行加密和解密。我需要一些实
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
有没有办法强制将另一个 窗口置于顶部? 不是应用程序的窗口,而是另一个已经在系统上运行的窗口。 (Windows, C/C++/C#) 最佳答案 SetWindowPos(that_window_ha
假设您可以在 C/C++ 或 Csharp 之间做出选择,并且您打算在 Windows 和 Linux 服务器上运行同一服务器的多个实例,那么构建套接字服务器应用程序的最明智选择是什么? 最佳答案 如
你们能告诉我它们之间的区别吗? 顺便问一下,有什么叫C++库或C库的吗? 最佳答案 C++ 标准库 和 C 标准库 是 C++ 和 C 标准定义的库,提供给 C++ 和 C 程序使用。那是那些词的共同
下面的测试代码,我将输出信息放在注释中。我使用的是 gcc 4.8.5 和 Centos 7.2。 #include #include class C { public:
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我的客户将使用名为 annoucement 的结构/类与客户通信。我想我会用 C++ 编写服务器。会有很多不同的类继承annoucement。我的问题是通过网络将这些类发送给客户端 我想也许我应该使用
我在 C# 中有以下函数: public Matrix ConcatDescriptors(IList> descriptors) { int cols = descriptors[0].Co
我有一个项目要编写一个函数来对某些数据执行某些操作。我可以用 C/C++ 编写代码,但我不想与雇主共享该函数的代码。相反,我只想让他有权在他自己的代码中调用该函数。是否可以?我想到了这两种方法 - 在
我使用的是编写糟糕的第 3 方 (C/C++) Api。我从托管代码(C++/CLI)中使用它。有时会出现“访问冲突错误”。这使整个应用程序崩溃。我知道我无法处理这些错误[如果指针访问非法内存位置等,
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 7 年前。
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,因为
我有一些 C 代码,将使用 P/Invoke 从 C# 调用。我正在尝试为这个 C 函数定义一个 C# 等效项。 SomeData* DoSomething(); struct SomeData {
这个问题已经有答案了: Why are these constructs using pre and post-increment undefined behavior? (14 个回答) 已关闭 6
我是一名优秀的程序员,十分优秀!