From: Aurelien Jarno <aurel32@debian.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 181951] Re: Single-stepping PPC targets chokes on branch instructions
Date: Sun, 20 Feb 2011 17:10:59 -0000 [thread overview]
Message-ID: <20110220171100.6679.580.launchpad@palladium.canonical.com> (raw)
In-Reply-To: 20080111082028.14423.41504.malonedeb@gangotri.ubuntu.com
** 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:
parent reply other threads:[~2011-02-20 17:21 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20080111082028.14423.41504.malonedeb@gangotri.ubuntu.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110220171100.6679.580.launchpad@palladium.canonical.com \
--to=aurel32@debian.org \
--cc=181951@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).