For example we have assembler variable "foo" defined as:

.text:00001078 foo      DCD 0xffffffff, 0xffffeeee

How it(variable foo) would look like in c++(or whatever higher lang)???


Many possibilities.

long long foo=0xffffffffffffeeee (assuming big endian mode)

long long foo=0xffffeeeeffffffff (assuming big endian mode)

int foo[2]={-1, -4370}

short foo[4]={-1, -1, -1, -4370}

char foo[16]="\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xee\xee\xee\xee"

struct { int a, short b, short c } foo = { -1, -1, -4370 } (and variations depending on endianness)

You really can't determine the original type of initalized data without looking at the code that uses it.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.