[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix breakpoints in nios2 user-mode emulation.

From: Sandra Loosemore
Subject: Re: [Qemu-devel] [PATCH] Fix breakpoints in nios2 user-mode emulation.
Date: Wed, 12 Sep 2018 12:01:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 09/12/2018 11:49 AM, Richard Henderson wrote:
On 09/11/2018 02:29 PM, Sandra Loosemore wrote:
Without this patch, QEMU exits immediately when it execution stops at
a breakpoint, instead of reporting it to GDB.

Signed-off-by: Sandra Loosemore <address@hidden>
  linux-user/nios2/cpu_loop.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c
index dac7a06..a5ae37f 100644
--- a/linux-user/nios2/cpu_loop.c
+++ b/linux-user/nios2/cpu_loop.c
@@ -71,6 +71,9 @@ void cpu_loop(CPUNios2State *env)
                  gdbsig = TARGET_SIGTRAP;
+        case EXCP_DEBUG:
+            gdbsig = TARGET_SIGTRAP;
+            break;

This really isn't complete.  You set gdbsig from odd places instead of using
queue_signal; you fail to honor the return value from gdb_handlesig.

But I suppose those should be separate patches, so
Reviewed-by: Richard Henderson <address@hidden>

Yes, I thought this code was rather ugly. But I thought a minimal patch to un-break GDB use would be easier to get in than any kind of rewrite, particularly given that I'm not terribly familiar with current best practices in the QEMU development community, etc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]