Skip to contentSkip to conversation

MicroBlaze QEMU skips jumps when using single steps in GDB

Qemu-devel Christophe 2 participants 5 messages Feb 1, 2011 – Feb 20, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Christophe

author
#1 lore raw

I'm having a similar issue with Qemu 0.13.0, program counter is just incremented by 4 when single stepping. I am using GDB 7.2. Stephan, did you get it to work in single step mode?

Signature · 28 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/550863

Title:
  MicroBlaze QEMU skips jumps when using single steps in GDB

Status in QEMU:
  New

Bug description:
  I'm trying to debug a MicroBlaze application (with the MicroBlaze
  system qemu, not the user mode qemu) using GDB. When I'm trying to
  single step through instructions all the branches are ignored: the
  program counter is just incremented by 4 (default), even for
  unconditional branches. This only occurs when using single step mode,
  everything runs as expected when using breakpoints only.

  Qemu Versions tested: 0.11.0, 0.12.3, GIT version (March 29, 2010)
  Qemu command used: qemu-system-microblaze -kernel test.elf  -S -s

  GDB Versions used: 7.1 (official MicroBlaze support), 6.5 (from Xilinx EDK 10.1), 5.3 (from Xilinx EDK 9.1)
  GCC Versions used: 4.1.1 (from Xilinx EDK 11.1)

  I've attached my program, it uses a custom linker script and startup
  code. It runs fine without using singlestep mode.

  The bug looks similar to one submitted for PPC a while ago (181951).
#2 lore raw
In reply to a message not in the archive

** Changed in: qemu
Status: New => Fix Committed

Signature · 28 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/550863

Title:
  MicroBlaze QEMU skips jumps when using single steps in GDB

Status in QEMU:
  Fix Committed

Bug description:
  I'm trying to debug a MicroBlaze application (with the MicroBlaze
  system qemu, not the user mode qemu) using GDB. When I'm trying to
  single step through instructions all the branches are ignored: the
  program counter is just incremented by 4 (default), even for
  unconditional branches. This only occurs when using single step mode,
  everything runs as expected when using breakpoints only.

  Qemu Versions tested: 0.11.0, 0.12.3, GIT version (March 29, 2010)
  Qemu command used: qemu-system-microblaze -kernel test.elf  -S -s

  GDB Versions used: 7.1 (official MicroBlaze support), 6.5 (from Xilinx EDK 10.1), 5.3 (from Xilinx EDK 9.1)
  GCC Versions used: 4.1.1 (from Xilinx EDK 11.1)

  I've attached my program, it uses a custom linker script and startup
  code. It runs fine without using singlestep mode.

  The bug looks similar to one submitted for PPC a while ago (181951).
#3 lore raw
In reply to a message not in the archive

Hi,

I've committed a patch (that I hope fixes this problem) into the qemu git repo.

Cheers

Look for the following commit:
commit 6c5f738daec123020d32543fe90a6633a4f6643e

Author: Edgar E. Iglesias <[email protected]>
Date:   Thu Feb 10 00:46:09 2011 +0100

microblaze: Handle singlestepping over direct jmps

Signature · 28 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/550863

Title:
  MicroBlaze QEMU skips jumps when using single steps in GDB

Status in QEMU:
  Fix Committed

Bug description:
  I'm trying to debug a MicroBlaze application (with the MicroBlaze
  system qemu, not the user mode qemu) using GDB. When I'm trying to
  single step through instructions all the branches are ignored: the
  program counter is just incremented by 4 (default), even for
  unconditional branches. This only occurs when using single step mode,
  everything runs as expected when using breakpoints only.

  Qemu Versions tested: 0.11.0, 0.12.3, GIT version (March 29, 2010)
  Qemu command used: qemu-system-microblaze -kernel test.elf  -S -s

  GDB Versions used: 7.1 (official MicroBlaze support), 6.5 (from Xilinx EDK 10.1), 5.3 (from Xilinx EDK 9.1)
  GCC Versions used: 4.1.1 (from Xilinx EDK 11.1)

  I've attached my program, it uses a custom linker script and startup
  code. It runs fine without using singlestep mode.

  The bug looks similar to one submitted for PPC a while ago (181951).
author
#4 lore raw
In reply to a message not in the archive

Thanks for the patch, so far so good...

Christophe

Signature · 28 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/550863

Title:
  MicroBlaze QEMU skips jumps when using single steps in GDB

Status in QEMU:
  Fix Committed

Bug description:
  I'm trying to debug a MicroBlaze application (with the MicroBlaze
  system qemu, not the user mode qemu) using GDB. When I'm trying to
  single step through instructions all the branches are ignored: the
  program counter is just incremented by 4 (default), even for
  unconditional branches. This only occurs when using single step mode,
  everything runs as expected when using breakpoints only.

  Qemu Versions tested: 0.11.0, 0.12.3, GIT version (March 29, 2010)
  Qemu command used: qemu-system-microblaze -kernel test.elf  -S -s

  GDB Versions used: 7.1 (official MicroBlaze support), 6.5 (from Xilinx EDK 10.1), 5.3 (from Xilinx EDK 9.1)
  GCC Versions used: 4.1.1 (from Xilinx EDK 11.1)

  I've attached my program, it uses a custom linker script and startup
  code. It runs fine without using singlestep mode.

  The bug looks similar to one submitted for PPC a while ago (181951).
#5 lore raw
In reply to a message not in the archive

** Changed in: qemu
Status: Fix Committed => Fix Released

Signature · 28 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/550863

Title:
  MicroBlaze QEMU skips jumps when using single steps in GDB

Status in QEMU:
  Fix Released

Bug description:
  I'm trying to debug a MicroBlaze application (with the MicroBlaze
  system qemu, not the user mode qemu) using GDB. When I'm trying to
  single step through instructions all the branches are ignored: the
  program counter is just incremented by 4 (default), even for
  unconditional branches. This only occurs when using single step mode,
  everything runs as expected when using breakpoints only.

  Qemu Versions tested: 0.11.0, 0.12.3, GIT version (March 29, 2010)
  Qemu command used: qemu-system-microblaze -kernel test.elf  -S -s

  GDB Versions used: 7.1 (official MicroBlaze support), 6.5 (from Xilinx EDK 10.1), 5.3 (from Xilinx EDK 9.1)
  GCC Versions used: 4.1.1 (from Xilinx EDK 11.1)

  I've attached my program, it uses a custom linker script and startup
  code. It runs fine without using singlestep mode.

  The bug looks similar to one submitted for PPC a while ago (181951).