2

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)???

1

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 agree to our terms of service, privacy policy and cookie policy

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