diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-06-22 15:11:57 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-02 13:08:21 +0100 |
commit | f34a0610714fa8e52ea3583caa53e264b0c0a7e6 (patch) | |
tree | 1083cbd66594ab3334523ea3ba696f4ad6732b49 /risu_reginfo_arm.c | |
parent | 6283dc82df05bcde52d0a6ba3a1c10443db1593d (diff) |
risu: add process_arch_opt
Allows the backend to do more that just set a flag when it comes to
processing options.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20180622141205.16306-15-alex.bennee@linaro.org
[AJB: tweaked order, added stdlib includes]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risu_reginfo_arm.c')
-rw-r--r-- | risu_reginfo_arm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/risu_reginfo_arm.c b/risu_reginfo_arm.c index 5acad02..12ad0ef 100644 --- a/risu_reginfo_arm.c +++ b/risu_reginfo_arm.c @@ -13,7 +13,7 @@ #include <stdio.h> #include <ucontext.h> #include <string.h> -#include <getopt.h> +#include <stdlib.h> #include "risu.h" #include "risu_reginfo_arm.h" @@ -22,13 +22,19 @@ extern int insnsize(ucontext_t *uc); /* Should we test for FP exception status bits? */ static int test_fp_exc; -static struct option extra_opts[] = { +static const struct option extra_opts[] = { {"test-fp-exc", no_argument, &test_fp_exc, 1}, {0, 0, 0, 0} }; -void *arch_long_opts = &extra_opts[0]; -char *arch_extra_help = " --test-fp-exc Check FP exception bits when comparing\n"; +const struct option * const arch_long_opts = &extra_opts[0]; +const char * const arch_extra_help = + " --test-fp-exc Check FP exception bits when comparing\n"; + +void process_arch_opt(int opt, const char *arg) +{ + abort(); +} static void reginfo_init_vfp(struct reginfo *ri, ucontext_t *uc) { |