qemu-arm
[Top][All Lists]
Advanced

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

[Qemu-arm] [RISU PATCH 02/11] reginfo.c: always return 1 on OP_TESTEND


From: Alex Bennée
Subject: [Qemu-arm] [RISU PATCH 02/11] reginfo.c: always return 1 on OP_TESTEND
Date: Tue, 4 Jul 2017 15:48:50 +0100

In the master/apprentice setup the response byte of 1 is returned by
write_fn. However when tracing it will happily report 0 as it
successfully writes the last bytes. To avoid running of the end when
tracing we just always return 1 at this point.

Signed-off-by: Alex Bennée <address@hidden>
---
 reginfo.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/reginfo.c b/reginfo.c
index d9d37b3..76f24f9 100644
--- a/reginfo.c
+++ b/reginfo.c
@@ -39,7 +39,10 @@ int send_register_info(write_fn write_fn, void *uc)
 
     switch (op) {
     case OP_TESTEND:
-        return write_fn(&ri, sizeof(ri));
+        write_fn(&ri, sizeof(ri));
+        /* if we are tracing write_fn will return 0 unlike a remote
+           end, hence we force return of 1 here */
+        return 1;
     case OP_SETMEMBLOCK:
         memblock = (void *)(uintptr_t)get_reginfo_paramreg(&ri);
         break;
-- 
2.13.0




reply via email to

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