Skip to content

RFC target-xtensa: implement debug option

Max Filippov qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9target-xtensa: add DEBUGCAUSE SR and configurationtarget-xtensa/cpu.h target-xtensa/translate.c+21 -00 replies
2/9target-xtensa: implement instruction breakpointstarget-xtensa/cpu.h target-xtensa/helper.c target-xtensa/helpers.h +2 more+119 -30 replies
3/9target-xtensa: add ICOUNT SR and debug exceptiontarget-xtensa/cpu.h target-xtensa/translate.c+54 -10 replies
4/9exec: add missing breaks to the watch_mem_writeexec.c+9 -31 reply
5/9exec: fix check_watchpoint exiting cpu_loopexec.c+2 -10 replies
6/9exec: let cpu_watchpoint_insert accept larger watchpointsexec.c+2 -10 replies
7/9target-xtensa: add DBREAK data breakpointstarget-xtensa/cpu.h target-xtensa/helper.c target-xtensa/helpers.h +2 more+147 -00 replies
8/9target-xtensa: add DEBUG_SECTION to overlay tooltarget-xtensa/core-dc232b.c target-xtensa/core-fsf.c target-xtensa/overlay_tool.h+7 -00 replies
9/9target-xtensa: add breakpoint teststests/tcg/xtensa/Makefile tests/tcg/xtensa/test_break.S+224 -00 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchAndreas Färber
1/9
2/9
3/9
4/9R-b
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [RFC 0/9] target-xtensa: implement debug option

This patch series implements Xtensa debug option: debug interrupt, breakpoint opcodes, instruction breakpoint SRs, instruction counting SR, data breakpoint SRs.

This option enables native debugging, e.g. now guest linux GDB is functional.

Three exec.c patches fixe watchpoints bits that nobody seems to use currently.

There are still unresolved issue with data breakpoints on unmapped memory:
Xtensa ISA says that data breakpoint exception has higher priority than TLB exception and thus accessing unmapped address that hits data breakpoint will raise debug exception. Watchpoint mapping is performed in the tlb_set_page, but it is not called in case of guest TLB miss. Any idea on how to resolve it is welcome.

Max Filippov (9):
target-xtensa: add DEBUGCAUSE SR and configuration
target-xtensa: implement instruction breakpoints
target-xtensa: add ICOUNT SR and debug exception
exec: add missing breaks to the watch_mem_write
exec: fix check_watchpoint exiting cpu_loop
exec: let cpu_watchpoint_insert accept larger watchpoints
target-xtensa: add DBREAK data breakpoints
target-xtensa: add DEBUG_SECTION to overlay tool
target-xtensa: add breakpoint tests

 exec.c                        |   18 +++-
 target-xtensa/core-dc232b.c   |    1 +
 target-xtensa/core-fsf.c      |    1 +
 target-xtensa/cpu.h           |   42 ++++++++
 target-xtensa/helper.c        |   43 ++++++++
 target-xtensa/helpers.h       |    7 ++
 target-xtensa/op_helper.c     |  100 ++++++++++++++++++
 target-xtensa/overlay_tool.h  |    5 +
 target-xtensa/translate.c     |  153 +++++++++++++++++++++++++++-
 tests/tcg/xtensa/Makefile     |    1 +
 tests/tcg/xtensa/test_break.S |  223 +++++++++++++++++++++++++++++++++++++++++
 11 files changed, 585 insertions(+), 9 deletions(-)
 create mode 100644 tests/tcg/xtensa/test_break.S
Signature · 1 line
1.7.7.6