diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-07-04 15:48:50 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-10 17:48:40 +0100 |
commit | 8c47a0a4fa68db5724271d5c498a6136368a9633 (patch) | |
tree | 871218131bc8b039ced066333b965a98100a2b77 | |
parent | b3a70837c2e939e6aab98247f18869d903077305 (diff) |
reginfo.c: always return 1 on OP_TESTEND
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 <alex.bennee@linaro.org>
Message-id: 20170704144859.17644-3-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | reginfo.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |