[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] target-ppc: gdbstub breakpoints get stuck in an infinite loop
From: |
Programmingkid |
Subject: |
[Qemu-ppc] target-ppc: gdbstub breakpoints get stuck in an infinite loop on next/continue |
Date: |
Fri, 21 Oct 2016 14:26:23 -0400 |
> Hi all,
>
> I've just noticed the above regression in git master whilst trying to
> debug something in openbios-ppc via QEMU's gdbstub. Reproduction here is
> fairly easy using a debug build of OpenBIOS which I've uploaded to
> https://www.ilande.co.uk/tmp/qemu/openbios-qemu.elf.nostrip for people
> to test against.
>
> ./qemu-system-ppc -bios openbios-qemu.elf.nostrip -s -S
>
> The infinite loop can be seen by adding a breakpoint to the OpenBIOS
> boot() function using gdb as below:
>
> $ powerpc-linux-gdb obj-ppc/openbios-qemu.elf.nostrip
> GNU gdb (GDB) 7.9.1
> Copyright (C) 2015 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 "--host=x86_64-unknown-linux-gnu
> --target=powerpc-linux".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from obj-ppc/openbios-qemu.elf.nostrip...done.
> (gdb) target remote :1234
> Remote debugging using :1234
>
> vector.0x100 () at
> /home/build/src/openbios/openbios.git/openbios/arch/ppc/qemu/start.S:284
> 284 b _entry
>
> (gdb) b boot
>
> Breakpoint 1 at 0xfff0bc00: file
> /home/build/src/openbios/openbios.git/openbios/arch/ppc/qemu/main.c,
> line 75.
>
> (gdb) c
> Continuing.
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0xfff0bbfc in boot () at
> /home/build/src/openbios/openbios.git/openbios/arch/ppc/qemu/main.c:74
> 74 {
> (gdb) n
>
> At this point the gdb session hangs whilst the GTK window title is
> constantly switching between paused/unpaused.
>
> A session with git bisect shows the bug was introduced with the
> following commit:
>
> bd6fefe71cec5a0c7d2be4ac96307f25db56abf9 is the first bad commit
> commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9
> Author: Benjamin Herrenschmidt <address@hidden>
> Date: Wed Jul 27 16:56:32 2016 +1000
>
> ppc: Make tlb_fill() use new exception helper
>
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
>
> :040000 040000 3494b2d68eef71c8f7c7d4e57c5ff715146028b2
> 00849bf5889d8ee5b5ce633122b7aedf4a734372 M linux-user
> :040000 040000 32b1a8078a44c44e6bfd2184061b6da553cfc821
> 58afefec7a9fc5380fb408758a11dbe749010b97 M target-ppc
>
>
> ATB,
>
> Mark.
Excellent job. I thought it was something I was doing wrong when I tried to
debug OpenBIOS using gdb.
- [Qemu-ppc] target-ppc: gdbstub breakpoints get stuck in an infinite loop on next/continue,
Programmingkid <=