From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RURiX-0001m9-EE for qemu-devel@nongnu.org; Sat, 26 Nov 2011 18:31:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RURiW-00027x-5f for qemu-devel@nongnu.org; Sat, 26 Nov 2011 18:31:33 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:50647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RURiV-00027t-Rv for qemu-devel@nongnu.org; Sat, 26 Nov 2011 18:31:32 -0500 Date: Sat, 26 Nov 2011 15:31:29 -0800 (PST) From: Gauresh Rane Message-ID: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] Problem with translating on ARM and Qemu beginner question List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Max Filippov , qemu-devel@nongnu.org Works Like a charm....The memory at that place was indeed not allocated. Thanks for your help. Regards, Gauresh Rane Grad Student CS Department UCLA ----- Original Message ----- From: "Peter Maydell" To: "Max Filippov" Cc: "Gauresh Rane" , qemu-devel@nongnu.org Sent: Friday, November 25, 2011 7:40:52 AM Subject: Re: [Qemu-devel] Problem with translating on ARM and Qemu beginner= question On 25 November 2011 15:35, Max Filippov wrote: >> Breakpoint 7, cpu_arm_exec (env=3D0x102033200) at ~/qemu-0.15.0/cpu-exec= .c:557 >> 557 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 next_tb =3D tcg_qemu_tb_exec(env, tc_ptr); >> (gdb) p/x env->regs >> $13 =3D {0x4002c00c, 0x20, 0x4, 0x0, 0x0, 0x0, 0x40000, 0x0, 0x0, 0x0, 0= x0, 0x0, 0x30, 0x10007fa8, 0x560d, 0x560c} >> (gdb) s >> 558 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 if ((next_tb & 3) =3D=3D 2) { >> (gdb) p/x env->regs >> $14 =3D {0x10048000, 0x20, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, = 0x0, 0x30, 0x10007fb8, 0x560d, 0x0} >> >> How to check access to unallocated memory? It's not seg faulting. > > 290 0000042c <_init>: > 291 =C2=A042c: =C2=A0 b5f8 =C2=A0 =C2=A0 =C2=A0 =C2=A0push =C2=A0 =C2=A0{= r3, r4, r5, r6, r7, lr} > > set breakpoint here and see with x/6wx $sp whether saved register values = are good. To clarify this a bit: that means "set a breakpoint in an ARM gdb attached to qemu's gdb-stub interface". That gdb will see the view of the guest CPU, whereas connecting an x86 gdb directly to qemu you're looking at qemu's internal data structures, which can be more confusing. -- PMM