Hello I'm programming under Linux ( In C ).
When i use ptrace() to read data, it returns a word. In all the examples I see people using a long to read the input. Does a Long always have the same size of a word? I know that a word is the natural size with which a processor is handling data (the register size). But does that also apply to long's on different architectures etc?
OValue_t outputValue;
//.su_word is a long
outputValue.su_word = ptrace(PTRACE_PEEKDATA,Process.ProcId,address,0);
printf("word : %ld\n", outputValue.su_word);
printf("int8 : %i\n", outputValue.su_int8);
EDIT: Thanks to Krzysztof Kosiński/unwind and the answer by Jonathan Leffler here I understand that ptrace returns a long and a long is big enough for a word.
http://docs.oracle.com/cd/E19620-01/805-3024/lp64-1/index.html