This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] arm reversible : <phase_2_complete>


Hi Tom,

So you are suggesting;

GET_REG_VAL (reg_cache, ARM_PC_REGNUM, &u_buf.buf[0]);
if (target is big endian)
  {
        convert_big_to_little (u_buf.s_word)
  }


something like above ?
right ?

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

Regards,
Oza.


----- Original Message ----
From: Tom Tromey <tromey@redhat.com>
To: paawan oza <paawan1982@yahoo.com>
Cc: Petr Hluzín <petr.hluzin@gmail.com>; gdb@sourceware.org; 
gdb-patches@sourceware.org
Sent: Fri, April 29, 2011 1:06:39 AM
Subject: Re: [PATCH] arm reversible : <phase_2_complete>

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

Oza> but whole operation happens on target memory, so 
Oza> after 
Oza> GET_REG_VAL (reg_cache, ARM_PC_REGNUM, &u_buf.buf[0]);

Oza> we get scalar u_buf.s_word again in big-endian.

Oza> +      start_address = u_buf.s_word -  \
Oza> +                   (4 * (bit (thumb_insn_r->arm_insn, 8) + 
register_count)) ;

Oza> and above math is again in target memory in big endian machine and
Oza> record is saved to target memory.

Oza> I think it never gets fetched to host for any reason, Am I thinking
Oza> correct?

No, sorry.  Any code in gdb is by running on the host system.

So, GET_REG_VAL fetches the raw register -- from the target to the host.
`u_buf.s_word' is a scalar value in gdb, i.e., on the host.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]