bernie2436
bernie2436

Reputation: 23921

how can i use gdb to to learn the size of the slots in an array?

I am looking at some C code that holds an array of names of other functions in the program.

myTypeDef myArrayName[3]={funcOne, funcTwo, funcThree};

How can I use GDB to learn how many bytes each slot in the array is?

Upvotes: 0

Views: 76

Answers (1)

cnicutar
cnicutar

Reputation: 182684

You don't need gdb to find that out, the compiler knows it all along. Each "slot" of the array is sizeof(myTypeDef) bytes.

Upvotes: 5

Related Questions