This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] arm reversible : <phase_2_complete>
- From: Tom Tromey <tromey at redhat dot com>
- To: paawan oza <paawan1982 at yahoo dot com>
- Cc: Petr HluzÃn <petr dot hluzin at gmail dot com>, gdb at sourceware dot org, gdb-patches at sourceware dot org
- Date: Mon, 02 May 2011 07:27:57 -0600
- Subject: Re: [PATCH] arm reversible : <phase_2_complete>
- References: <341905.10459.qm@web112513.mail.gq1.yahoo.com> <m3d3m8xdf7.fsf@fleche.redhat.com> <208397.95006.qm@web112517.mail.gq1.yahoo.com> <4DA27006.1080607@codesourcery.com> <763549.92092.qm@web112506.mail.gq1.yahoo.com> <335149.24692.qm@web112515.mail.gq1.yahoo.com> <BANLkTik+_-KcX+=vVOeqwX-FNxYkQuEzXA@mail.gmail.com> <592215.58786.qm@web112508.mail.gq1.yahoo.com> <172713.29831.qm__351.089161313389$1303740245$gmane$org@web112503.mail.gq1.yahoo.com> <m3zknet882.fsf@fleche.redhat.com> <136943.43839.qm@web112518.mail.gq1.yahoo.com> <m3iptyfbgq.fsf@fleche.redhat.com> <727567.12089.qm__13056.408687453$1304018591$gmane$org@web112511.mail.gq1.yahoo.com> <m3aafaf9rs.fsf@fleche.redhat.com> <924576.78639.qm@web112515.mail.gq1.yahoo.com>
>>>>> "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