gdbstub: rationalise signal mapping in softmmu
We don't really need a table for mapping two symbols. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-13-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-13-richard.henderson@linaro.org>
This commit is contained in:
parent
d96bf49ba8
commit
ccd4c7c24a
@ -506,20 +506,14 @@ enum {
|
|||||||
TARGET_SIGTRAP = 5
|
TARGET_SIGTRAP = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
static int gdb_signal_table[] = {
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
TARGET_SIGINT,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
TARGET_SIGTRAP
|
|
||||||
};
|
|
||||||
|
|
||||||
int gdb_signal_to_target(int sig)
|
int gdb_signal_to_target(int sig)
|
||||||
{
|
{
|
||||||
if (sig < ARRAY_SIZE(gdb_signal_table)) {
|
switch (sig) {
|
||||||
return gdb_signal_table[sig];
|
case 2:
|
||||||
} else {
|
return TARGET_SIGINT;
|
||||||
|
case 5:
|
||||||
|
return TARGET_SIGTRAP;
|
||||||
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user