From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3740 invoked by alias); 31 Jan 2011 13:50:07 -0000 Received: (qmail 3727 invoked by uid 22791); 31 Jan 2011 13:50:05 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,TW_MV,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm4-vm1.bullet.mail.sp2.yahoo.com (HELO nm4-vm1.bullet.mail.sp2.yahoo.com) (98.139.91.191) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 31 Jan 2011 13:49:59 +0000 Received: from [98.139.91.61] by nm4.bullet.mail.sp2.yahoo.com with NNFMP; 31 Jan 2011 13:49:58 -0000 Received: from [98.139.91.32] by tm1.bullet.mail.sp2.yahoo.com with NNFMP; 31 Jan 2011 13:49:58 -0000 Received: from [127.0.0.1] by omp1032.mail.sp2.yahoo.com with NNFMP; 31 Jan 2011 13:49:58 -0000 Received: (qmail 40767 invoked by uid 60001); 31 Jan 2011 13:49:57 -0000 Message-ID: <610357.40561.qm@web112518.mail.gq1.yahoo.com> Received: from [123.237.143.185] by web112518.mail.gq1.yahoo.com via HTTP; Mon, 31 Jan 2011 05:49:57 PST References: <442684.38194.qm@web112512.mail.gq1.yahoo.com> <4D309B17.7020400@vmware.com> Date: Mon, 31 Jan 2011 13:50:00 -0000 From: paawan oza Subject: arm reversible execution query To: "gdb@sourceware.org" In-Reply-To: <4D309B17.7020400@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00115.txt.bz2 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 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: ... 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 0x00008498 <+60>: mov r1, r3 0x0000849c <+64>: bl 0x8378 0x000084a0 <+68>: ldr r3, [r11, #-8] 0x000084a4 <+72>: mov r0, r3 0x000084a8 <+76>: bl 0x8434 0x000084ac <+80>: ldr r0, [pc, #12] ; 0x84c0 0x000084b0 <+84>: bl 0x8378 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 To: paawan oza Cc: "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, ®); > 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*.