diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-05-15 19:19:58 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-05-25 10:10:55 +0200 |
commit | 4f71086665360eb15cb0cc3392bd5063f26ee934 (patch) | |
tree | 62bf6efeeeb4e4baae4192d36da17728964acc7e /gdbstub.c | |
parent | b0a7413dd53cbb75227152374689c3bde39c89db (diff) |
gdbstub: Clarify what gdb_handlesig() is doing
gdb_handlesig()'s behaviour is not entirely obvious at first
glance. Add a doc comment for it, and also add a comment
explaining why it's ok for gdb_do_syscallv() to ignore
gdb_handlesig()'s return value. (Coverity complains about
this: CID 1390850.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515181958.25837-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1558,6 +1558,12 @@ void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va) *p = 0; #ifdef CONFIG_USER_ONLY put_packet(s, s->syscall_buf); + /* Return control to gdb for it to process the syscall request. + * Since the protocol requires that gdb hands control back to us + * using a "here are the results" F packet, we don't need to check + * gdb_handlesig's return value (which is the signal to deliver if + * execution was resumed via a continue packet). + */ gdb_handlesig(s->c_cpu, 0); #else /* In this case wait to send the syscall packet until notification that |