[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 181951] Re: Single-stepping PPC targets chokes on bran
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [Bug 181951] Re: Single-stepping PPC targets chokes on branch instructions |
Date: |
Sun, 20 Feb 2011 17:10:59 -0000 |
** Changed in: qemu
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/181951
Title:
Single-stepping PPC targets chokes on branch instructions
Status in QEMU:
Fix Released
Bug description:
qemu CVS HEAD (11.01.2008)
qemu-0.9.1 stable
Single stepping (MSR_SE bit set in MSR) in qemu-system-ppc doesn't
allow to step any branch instruction. Can be reproduced by boot a
Linux image with a gdb something debuggable in the rootfs:
/ # gdb testprg
GNU gdb 6.3.50.20050810
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x10000520: file testprg.c, line 26.
(gdb) run
Starting program: testprg
Breakpoint 1, main () at testprg.c:26
26 testprg.c: No such file or directory.
in testprg.c
(gdb) disassemble
Dump of assembler code for function main:
0x1000050c <main+0>:stwu r1,-32(r1)
0x10000510 <main+4>:mflr r0
0x10000514 <main+8>:stw r31,28(r1)
0x10000518 <main+12>:stw r0,36(r1)
0x1000051c <main+16>:mr r31,r1
0x10000520 <main+20>:lis r9,4096
0x10000524 <main+24>:addi r3,r9,2376
0x10000528 <main+28>:crclr 4*cr1+eq
0x1000052c <main+32>:bl 0x10010ad8 <printf>
0x10000530 <main+36>:lis r9,4096
...
(gdb) stepi
0x10000524 26 in testprg.c
(gdb) stepi
0x10000528 26 in testprg.c
(gdb) stepi
0x1000052c 26 in testprg.c
(gdb) stepi
<<< QEMU HANGS! >>>
The issue can be resolved using this patch:
Index: target-ppc/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-ppc/translate.c,v
retrieving revision 1.115
diff -u -r1.115 translate.c
--- target-ppc/translate.c 24 Nov 2007 02:03:55 -0000 1.115
+++ target-ppc/translate.c 10 Jan 2008 13:54:36 -0000
@@ -2811,8 +2811,6 @@
#endif
gen_op_b_T1();
gen_op_set_T0((long)tb + n);
- if (ctx->singlestep_enabled)
- gen_op_debug();
gen_op_exit_tb();
} else {
gen_set_T1(dest);
@@ -2823,8 +2821,6 @@
#endif
gen_op_b_T1();
gen_op_reset_T0();
- if (ctx->singlestep_enabled)
- gen_op_debug();
gen_op_exit_tb();
}
}
@@ -3007,8 +3003,6 @@
gen_op_btest_T1(ctx->nip);
gen_op_reset_T0();
no_test:
- if (ctx->singlestep_enabled)
- gen_op_debug();
gen_op_exit_tb();
}
out:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [Bug 181951] Re: Single-stepping PPC targets chokes on branch instructions,
Aurelien Jarno <=