Re: [PATCH] arm reversible : <phase_2_complete>

Tom Tromey
2011-05-02T13:28:19Z

>>>>> "Oza" == paawan oza <paawan1982@yahoo.com> writes:

Oza> So you are suggesting;
Oza> GET_REG_VAL (reg_cache, ARM_PC_REGNUM, &u_buf.buf[0]);
Oza> if (target is big endian)
Oza> {
Oza> convert_big_to_little (u_buf.s_word)
Oza> }
Oza> something like above ?
Oza> right ?

More or less, but if you use the existing functions like
extract_unsigned_integer or extract_typed_address, then they
will handle all the details.

Oza> and while replaying do I need to convert it to big endian ?
Oza> somethig like that ?

It depends on what you are doing.

If you are doing calculations on some number, then you have to extract
it properly so that the host math works correctly. If you are just
storing some data to be restored verbatim, then you don't need to
convert at all.

Tom