Consider :
int x[] = {1, 2, 3};
int main(){
return 0;
}
If we do an objdump of the data section, we will get the variable x with the starting address and the size as (4*3) bytes. Is there any easy way to retrieve the information that x was an array and of what type?
I know we can do this using dwarfdump -i a.out and then parse the result to achieve the same, but is there anything easier which can be done. I just need to check if it was an array and of what type ?
Regards,
pankaj