[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] gdbstub: Add a missing case of signal number tr
From: |
Martin Simmons |
Subject: |
Re: [Qemu-devel] [PATCH] gdbstub: Add a missing case of signal number translation in gdbstub |
Date: |
Wed, 5 Nov 2014 14:47:39 GMT |
>>>>> On Wed, 5 Nov 2014 14:17:36 +0000, Peter Maydell said:
>
> On 5 November 2014 13:50, Martin Simmons <address@hidden> wrote:
> >>>>>> On Tue, 4 Nov 2014 19:09:43 +0000, Peter Maydell said:
> >> The if() statement should have braces for our coding style,
> >> and no space before the '(' in function calls; otherwise this
> >> looks good to me.
> >
> > Do you want a new patch with it like that? I was following the style of the
> > rest of that file, in particular the other 'C' case :-(
>
> Yes, if you could respin it that would be nice. Unfortunately there
> are still areas of our codebase which don't follow the coding
> style; we update bits of code as we change them, so new patches
> follow the style guide for the lines they touch. You can use
> scripts/checkpatch.pl to check your patch for the most common
> issues.
OK, here it is.
Signed-off-by: Martin Simmons <address@hidden>
diff --git a/gdbstub.c b/gdbstub.c
index d1b5afd..0faca56 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -823,7 +823,10 @@ static int gdb_handle_packet(GDBState *s, const char
*line_buf)
action = *p++;
signal = 0;
if (action == 'C' || action == 'S') {
- signal = strtoul(p, (char **)&p, 16);
+ signal = gdb_signal_to_target(strtoul(p, (char **)&p, 16));
+ if (signal == -1) {
+ signal = 0;
+ }
} else if (action != 'c' && action != 's') {
res = 0;
break;
__Martin