Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* regcache_raw_supply query
@ 2011-01-14 10:14 paawan oza
  2011-01-14 18:51 ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: paawan oza @ 2011-01-14 10:14 UTC (permalink / raw)
  To: gdb

Hi,

I am using 
regcache_raw_supply (armr.regcache, ARM_PS_REGNUM, &reg);
API to fetch arm register value

Is there any macro or API available to fetch arm register's value ?
or 
it is ok to use regcache_raw_supply ?

Regards,
Oza.




----- Original Message ----
From: paawan oza <paawan1982@yahoo.com>
To: gdb@sourceware.org
Sent: Wed, January 5, 2011 6:17:19 PM
Subject: Re: arm reversile debugging ; progress

Hi all,

I am going to implement reversible on 
processor: S3C6410, ARM1176JZF-S, up to 667MHz, and got the 
arm-linux running on development kit. 
so will change linux ABI part in the second phase.

Regards,
Oza.




----- Original Message ----
From: paawan oza <paawan1982@yahoo.com>
To: gdb@sourceware.org
Sent: Wed, November 24, 2010 11:30:35 AM
Subject: arm reversile debugging ; progress

Hi,

I have been trying to setup test environment for the changes in arm-dep.c.
where I tried to partially finish arm-reverse part, but there is no way I am 
able to test because of 'target sim' and arm-tool chain are not being 
compatible.

finally I have decided to purchase, arm development kit and finish both arm-abi 
and linux-abi part of arm target itself, i though that would be more convenient.

May I have some inputs on which development kit will be best suitable for above 
?  


Regards,
Oza.


      


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

* Re: regcache_raw_supply query
  2011-01-14 10:14 regcache_raw_supply query paawan oza
@ 2011-01-14 18:51 ` Michael Snyder
  2011-01-31 13:50   ` arm reversible execution query paawan oza
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2011-01-14 18:51 UTC (permalink / raw)
  To: paawan oza; +Cc: gdb

paawan oza wrote:
> Hi,
> 
> I am using 
> regcache_raw_supply (armr.regcache, ARM_PS_REGNUM, &reg);
> API to fetch arm register value
> 
> Is there any macro or API available to fetch arm register's value ?
> or 
> it is ok to use regcache_raw_supply ?


It is fine to use that function, as well as
regcache_raw_read* and regcache_raw_write*.


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

* arm reversible execution query
  2011-01-14 18:51 ` Michael Snyder
@ 2011-01-31 13:50   ` paawan oza
  2011-01-31 18:53     ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: paawan oza @ 2011-01-31 13:50 UTC (permalink / raw)
  To: gdb



Hi all,

I have been wroking on arm-reversible implementation and doing arm insn part. 
I am done with framework, and supporting 30-40% on insns till now.
when I simply test on arm board, 
I find that,

all the memory and registers are replayed correctly and recording is happening.
but,
do I need to save Program counter explicitly ?
doesnt gdb reversible framework take care of changing pc when I apply 
reverse-stepi/nexti command ?

as i386-tdep.c, does not seem to be saving PC explicitly.

please clarify.
following is arm board output :
and youmay observe that PC is not being moved automatically by internal record.c 
/ framework

[root@EmbedSky gdb]# ./gdb ./test_mov 
GNU gdb (GDB) 7.2.50.20110106
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /sddisk/gdb-7.2.50.20110106/gdb/test_mov...done.
(gdb) start
Temporary breakpoint 1 at 0x8468: file test.c, line 10.
Starting program: /sddisk/gdb-7.2.50.20110106/gdb/test_mov 
re
Temporary breakpoint 1, main () at test.c:10
10           s = 10;
(gdb) record
(gdb) disp s
1: s = 1073892864
(gdb) n
11           s = 15;
1: s = 10
(gdb) 
12           s = 20;
1: s = 15
(gdb) 
13           s = -30;
1: s = 20
(gdb) reverse-next
13           s = -30;
1: s = 15
(gdb) reverse-next
13           s = -30;
1: s = 15
(gdb) reverse-next
13           s = -30;
1: s = 10
(gdb) reverse-next
13           s = -30;
1: s = 10
(gdb) reverse-next
13           s = -30;
1: s = 1073892864
(gdb) list
8       {
9            int s;
10           s = 10;
11           s = 15;
12           s = 20;
13           s = -30;
14           s = 88;
15           printf("address of s is 0x%X\n",&s);
16           a(s);
17           printf("hello world");
(gdb) disass main
Dump of assembler code for function main:
   0x0000845c <+0>:     push    {r11, lr}
   0x00008460 <+4>:     add     r11, sp, #4
   0x00008464 <+8>:     sub     sp, sp, #16
   0x00008468 <+12>:    mov     r3, #10
   0x0000846c <+16>:    str     r3, [r11, #-8]
   0x00008470 <+20>:    mov     r3, #15
   0x00008474 <+24>:    str     r3, [r11, #-8]
   0x00008478 <+28>:    mov     r3, #20
   0x0000847c <+32>:    str     r3, [r11, #-8]
=> 0x00008480 <+36>:    mvn     r3, #29
   0x00008484 <+40>:    str     r3, [r11, #-8]
   0x00008488 <+44>:    mov     r3, #88 ; 0x58
   0x0000848c <+48>:    str     r3, [r11, #-8]
   0x00008490 <+52>:    sub     r3, r11, #8
   0x00008494 <+56>:    ldr     r0, [pc, #32]   ; 0x84bc <main+96>
   0x00008498 <+60>:    mov     r1, r3
   0x0000849c <+64>:    bl      0x8378 <printf>
   0x000084a0 <+68>:    ldr     r3, [r11, #-8]
   0x000084a4 <+72>:    mov     r0, r3
   0x000084a8 <+76>:    bl      0x8434 <a>
   0x000084ac <+80>:    ldr     r0, [pc, #12]   ; 0x84c0 <main+100>
   0x000084b0 <+84>:    bl      0x8378 <printf>
   0x000084b4 <+88>:    sub     sp, r11, #4
   0x000084b8 <+92>:    pop     {r11, pc}
   0x000084bc <+96>:    andeq   r8, r0, r8, asr r5
   0x000084c0 <+100>:   andeq   r8, r0, r0, ror r5
End of assembler dump.
(gdb) 

Regards,
Oza.


----- Original Message ----
From: Michael Snyder <msnyder@vmware.com>
To: paawan oza <paawan1982@yahoo.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Sent: Sat, January 15, 2011 12:21:03 AM
Subject: Re: regcache_raw_supply query

paawan oza wrote:
> Hi,
> 
> I am using regcache_raw_supply (armr.regcache, ARM_PS_REGNUM, &reg);
> API to fetch arm register value
> 
> Is there any macro or API available to fetch arm register's value ?
> or it is ok to use regcache_raw_supply ?


It is fine to use that function, as well as
regcache_raw_read* and regcache_raw_write*.


      


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

* Re: arm reversible execution query
  2011-01-31 13:50   ` arm reversible execution query paawan oza
@ 2011-01-31 18:53     ` Michael Snyder
  2011-02-01  3:20       ` paawan oza
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2011-01-31 18:53 UTC (permalink / raw)
  To: paawan oza; +Cc: gdb

paawan oza wrote:
> 
> Hi all,
> 
> I have been wroking on arm-reversible implementation and doing arm insn part. 
> I am done with framework, and supporting 30-40% on insns till now.
> when I simply test on arm board, 
> I find that,
> 
> all the memory and registers are replayed correctly and recording is happening.
> but,
> do I need to save Program counter explicitly ?
> doesnt gdb reversible framework take care of changing pc when I apply 
> reverse-stepi/nexti command ?
> 
> as i386-tdep.c, does not seem to be saving PC explicitly.
> 
> please clarify.


i386-tdep.c does save the PC ($eip), at the end of function 
i386_process_record.

If you don't save the PC, how can you do a reverse jump?


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

* Re: arm reversible execution query
  2011-01-31 18:53     ` Michael Snyder
@ 2011-02-01  3:20       ` paawan oza
  0 siblings, 0 replies; 5+ messages in thread
From: paawan oza @ 2011-02-01  3:20 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

Hi Michael,

thank you for your reply.

I think you are referring to below line. in process_record.

I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REIP_REGNUM);
  if (record_arch_list_add_end ())
    return -1;


I got it that it has to be saved explicitly by process record arch level.

Thanks,
Oza.


----- Original Message ----
From: Michael Snyder <msnyder@vmware.com>
To: paawan oza <paawan1982@yahoo.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Sent: Tue, February 1, 2011 12:23:14 AM
Subject: Re: arm reversible execution query

paawan oza wrote:
> 
> Hi all,
> 
> I have been wroking on arm-reversible implementation and doing arm insn part. I 
>am done with framework, and supporting 30-40% on insns till now.
> when I simply test on arm board, I find that,
> 
> all the memory and registers are replayed correctly and recording is 
happening.
> but,
> do I need to save Program counter explicitly ?
> doesnt gdb reversible framework take care of changing pc when I apply 
>reverse-stepi/nexti command ?
> 
> as i386-tdep.c, does not seem to be saving PC explicitly.
> 
> please clarify.


i386-tdep.c does save the PC ($eip), at the end of function i386_process_record.

If you don't save the PC, how can you do a reverse jump?


      


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

end of thread, other threads:[~2011-02-01  3:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 10:14 regcache_raw_supply query paawan oza
2011-01-14 18:51 ` Michael Snyder
2011-01-31 13:50   ` arm reversible execution query paawan oza
2011-01-31 18:53     ` Michael Snyder
2011-02-01  3:20       ` paawan oza

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