Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在查看一些 C 代码,其中包含程序中其他函数的名称数组。
myTypeDef myArrayName[3]={funcOne, funcTwo, funcThree};
如何使用 GDB 了解数组中每个插槽的字节数?
你不需要gdb找出来,编译器一直都知道。数组的每个“槽”都是sizeof(myTypeDef)字节。
gdb
sizeof(myTypeDef)