aboutsummaryrefslogtreecommitdiff
path: root/gdbstub/softmmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbstub/softmmu.c')
-rw-r--r--gdbstub/softmmu.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/gdbstub/softmmu.c b/gdbstub/softmmu.c
index a6c196ade6..6796761fd9 100644
--- a/gdbstub/softmmu.c
+++ b/gdbstub/softmmu.c
@@ -506,20 +506,14 @@ enum {
TARGET_SIGTRAP = 5
};
-static int gdb_signal_table[] = {
- -1,
- -1,
- TARGET_SIGINT,
- -1,
- -1,
- TARGET_SIGTRAP
-};
-
int gdb_signal_to_target(int sig)
{
- if (sig < ARRAY_SIZE(gdb_signal_table)) {
- return gdb_signal_table[sig];
- } else {
+ switch (sig) {
+ case 2:
+ return TARGET_SIGINT;
+ case 5:
+ return TARGET_SIGTRAP;
+ default:
return -1;
}
}