diff mbox series

[PULL,44/44] Hexagon (linux-user/hexagon): handle breakpoints

Message ID 20230512214706.946068-45-tsimpson@quicinc.com
State New
Headers show
Series [PULL,01/44] Hexagon (target/hexagon) Add support for v68/v69/v71/v73 | expand

Commit Message

Taylor Simpson May 12, 2023, 9:47 p.m. UTC
From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>

This enables LLDB to work with hexagon linux-user mode through the GDB
remote protocol.

Helped-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <c287a129dcbe7d974d8b7608e8672d34a3c91c04.1683214375.git.quic_mathbern@quicinc.com>
---
 linux-user/hexagon/cpu_loop.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/linux-user/hexagon/cpu_loop.c b/linux-user/hexagon/cpu_loop.c
index b84e25bf71..7f1499ed28 100644
--- a/linux-user/hexagon/cpu_loop.c
+++ b/linux-user/hexagon/cpu_loop.c
@@ -63,6 +63,9 @@  void cpu_loop(CPUHexagonState *env)
         case EXCP_ATOMIC:
             cpu_exec_step_atomic(cs);
             break;
+        case EXCP_DEBUG:
+            force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, 0);
+            break;
         default:
             EXCP_DUMP(env, "\nqemu: unhandled CPU exception %#x - aborting\n",
                      trapnr);