Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* MMX & Floating point insn suport for reversible debugging
@ 2009-05-13 16:17 paawan oza
  2009-05-13 16:38 ` Hui Zhu
  0 siblings, 1 reply; 5+ messages in thread
From: paawan oza @ 2009-05-13 16:17 UTC (permalink / raw)
  To: Hui Zhu
  Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
	Michael Snyder, Eli Zaretskii, Mark Kettenis


Hi Hui,

file : linux-tdep.c
function : i386_process_record

here I start adding floating point register support.
I think it records the memory

so remaining thing for floating point is store registers st0 to st7.


code to be added here...
   /* floats */
      /* It just record the memory change of instrcution. */
    case 0xd8:
    case 0xd9:
    case 0xda:
    case 0xdb:
    case 0xdc:
    case 0xdd:
    case 0xde:
    case 0xdf:


I am not sure ptrace will give FPU affected flags !!!

and another thing is ; 
take floating point insn 
opcode  mnemnic   desc
DE F9   FDIVP     Divide ST(1) by ST(0), 
                  store result in ST(1), and pop the register stack.

I do not think code is taking care of 2 bytes floating instruction..
I suspoe ModR/M and SIB byte encoding is taken care with respect to floating point.

please clarify.

Regards,
Oza.







      


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: MMX & Floating point insn suport for reversible debugging
  2009-05-13 16:17 MMX & Floating point insn suport for reversible debugging paawan oza
@ 2009-05-13 16:38 ` Hui Zhu
  0 siblings, 0 replies; 5+ messages in thread
From: Hui Zhu @ 2009-05-13 16:38 UTC (permalink / raw)
  To: paawan oza; +Cc: gdb ml

Maybe you can read i387-tdep.c.

Thanks,
Hui

On Thu, May 14, 2009 at 00:17, paawan oza <paawan1982@yahoo.com> wrote:
>
> Hi Hui,
>
> file : linux-tdep.c
> function : i386_process_record
>
> here I start adding floating point register support.
> I think it records the memory
>
> so remaining thing for floating point is store registers st0 to st7.
>
>
> code to be added here...
>   /* floats */
>      /* It just record the memory change of instrcution. */
>    case 0xd8:
>    case 0xd9:
>    case 0xda:
>    case 0xdb:
>    case 0xdc:
>    case 0xdd:
>    case 0xde:
>    case 0xdf:
>
>
> I am not sure ptrace will give FPU affected flags !!!
>
> and another thing is ;
> take floating point insn
> opcode  mnemnic   desc
> DE F9   FDIVP     Divide ST(1) by ST(0),
>                  store result in ST(1), and pop the register stack.
>
> I do not think code is taking care of 2 bytes floating instruction..
> I suspoe ModR/M and SIB byte encoding is taken care with respect to floating point.
>
> please clarify.
>
> Regards,
> Oza.
>
>
>
>
>
>
>
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: MMX & Floating point insn suport for reversible debugging
@ 2009-05-15 14:16 paawan oza
  0 siblings, 0 replies; 5+ messages in thread
From: paawan oza @ 2009-05-15 14:16 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb ml


Thank you for your inputs.
I will try to post question more clearly : )

my question was :
Do we need to record floating point flags (C0,C1,C2 and c3) along with floating point registers ?

Regards,
Oza.

--- On Thu, 5/14/09, Hui Zhu <teawater@gmail.com> wrote:

> From: Hui Zhu <teawater@gmail.com>
> Subject: Re: MMX & Floating point insn suport for reversible debugging
> To: "paawan oza" <paawan1982@yahoo.com>
> Cc: "gdb ml" <gdb@sourceware.org>
> Date: Thursday, May 14, 2009, 12:41 PM
> On Thu, May 14, 2009 at 00:44, paawan
> oza <paawan1982@yahoo.com>
> wrote:
> >
> > I have gone through i387-tdep.c.
> > and I have come up with following doubts.
> >
> >  here I start adding floating point register
> support.
> >  I think curerntly it records the memory
> >
> >  so remaining thing for floating point is store
> >  registers st0 to st7.
> >
> >
> >> > code to be added here...
> >> >   /* floats */
> >> >      /* It just record the memory change
> of
> >> instrcution. */
> >> >    case 0xd8:
> >> >    case 0xd9:
> >> >    case 0xda:
> >> >    case 0xdb:
> >> >    case 0xdc:
> >> >    case 0xdd:
> >> >    case 0xde:
> >> >    case 0xdf:
> >> >
> >> >
> >    do we need to collect affect FPU flags !!
> 
> If gdb can output and set this flags, you need to do it.
> And I suggest you post more clear information about your
> question that
> you know when you have question with it.  It will make
> people reply
> you mail easyly, right?  :)
> 
> >
> >    and another thing is ;
> >    take floating point insn
> >    opcode  mnemnic   desc
> >    DE F9   FDIVP     Divide ST(1) by ST(0),
> >                      store result in ST(1),
> and
> >                      pop the register
> stack.
> >
> > I do not think code is taking care of 2 bytes
> floating
> > instruction..
> > I suspoe ModR/M and SIB byte encoding is taken care
> > with respect to floating point.
> 
> Why you can't put the code for "DE F9" in:
> >> >    case 0xde:
> 
> 
> Thanks,
> Hui
> 


      


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: MMX & Floating point insn suport for reversible debugging
  2009-05-13 16:44 paawan oza
@ 2009-05-14  7:11 ` Hui Zhu
  0 siblings, 0 replies; 5+ messages in thread
From: Hui Zhu @ 2009-05-14  7:11 UTC (permalink / raw)
  To: paawan oza; +Cc: gdb ml

On Thu, May 14, 2009 at 00:44, paawan oza <paawan1982@yahoo.com> wrote:
>
> I have gone through i387-tdep.c.
> and I have come up with following doubts.
>
>  here I start adding floating point register support.
>  I think curerntly it records the memory
>
>  so remaining thing for floating point is store
>  registers st0 to st7.
>
>
>> > code to be added here...
>> >   /* floats */
>> >      /* It just record the memory change of
>> instrcution. */
>> >    case 0xd8:
>> >    case 0xd9:
>> >    case 0xda:
>> >    case 0xdb:
>> >    case 0xdc:
>> >    case 0xdd:
>> >    case 0xde:
>> >    case 0xdf:
>> >
>> >
>    do we need to collect affect FPU flags !!

If gdb can output and set this flags, you need to do it.
And I suggest you post more clear information about your question that
you know when you have question with it.  It will make people reply
you mail easyly, right?  :)

>
>    and another thing is ;
>    take floating point insn
>    opcode  mnemnic   desc
>    DE F9   FDIVP     Divide ST(1) by ST(0),
>                      store result in ST(1), and
>                      pop the register stack.
>
> I do not think code is taking care of 2 bytes floating
> instruction..
> I suspoe ModR/M and SIB byte encoding is taken care
> with respect to floating point.

Why you can't put the code for "DE F9" in:
>> >    case 0xde:


Thanks,
Hui


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: MMX & Floating point insn suport for reversible debugging
@ 2009-05-13 16:44 paawan oza
  2009-05-14  7:11 ` Hui Zhu
  0 siblings, 1 reply; 5+ messages in thread
From: paawan oza @ 2009-05-13 16:44 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb ml


I have gone through i387-tdep.c.
and I have come up with following doubts.

 here I start adding floating point register support.
 I think curerntly it records the memory

 so remaining thing for floating point is store
 registers st0 to st7.


> > code to be added here...
> >   /* floats */
> >      /* It just record the memory change of
> instrcution. */
> >    case 0xd8:
> >    case 0xd9:
> >    case 0xda:
> >    case 0xdb:
> >    case 0xdc:
> >    case 0xdd:
> >    case 0xde:
> >    case 0xdf:
> >
> >
    do we need to collect affect FPU flags !!

    and another thing is ;
    take floating point insn
    opcode  mnemnic   desc
    DE F9   FDIVP     Divide ST(1) by ST(0),
                      store result in ST(1), and
                      pop the register stack.

I do not think code is taking care of 2 bytes floating
instruction..
I suspoe ModR/M and SIB byte encoding is taken care
with respect to floating point.

please clarify.

Regards,
Oza.


--- On Wed, 5/13/09, Hui Zhu <teawater@gmail.com> wrote:

> From: Hui Zhu <teawater@gmail.com>
> Subject: Re: MMX & Floating point insn suport for reversible debugging
> To: "paawan oza" <paawan1982@yahoo.com>
> Cc: "gdb ml" <gdb@sourceware.org>
> Date: Wednesday, May 13, 2009, 10:07 PM
> Maybe you can read i387-tdep.c.
> 
> Thanks,
> Hui
> 
> On Thu, May 14, 2009 at 00:17, paawan oza <paawan1982@yahoo.com>
> wrote:
> >
> > Hi Hui,
> >
> > file : linux-tdep.c
> > function : i386_process_record
> >
> > here I start adding floating point register support.
> > I think it records the memory
> >
> > so remaining thing for floating point is store
> registers st0 to st7.
> >
> >
> > code to be added here...
> >   /* floats */
> >      /* It just record the memory change of
> instrcution. */
> >    case 0xd8:
> >    case 0xd9:
> >    case 0xda:
> >    case 0xdb:
> >    case 0xdc:
> >    case 0xdd:
> >    case 0xde:
> >    case 0xdf:
> >
> >
> > I am not sure ptrace will give FPU affected flags !!!
> >
> > and another thing is ;
> > take floating point insn
> > opcode  mnemnic   desc
> > DE F9   FDIVP     Divide ST(1) by ST(0),
> >                  store result in ST(1), and
> pop the register stack.
> >
> > I do not think code is taking care of 2 bytes floating
> instruction..
> > I suspoe ModR/M and SIB byte encoding is taken care
> with respect to floating point.
> >
> > please clarify.
> >
> > Regards,
> > Oza.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-15 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 16:17 MMX & Floating point insn suport for reversible debugging paawan oza
2009-05-13 16:38 ` Hui Zhu
2009-05-13 16:44 paawan oza
2009-05-14  7:11 ` Hui Zhu
2009-05-15 14:16 paawan oza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox